* Benchmark: Object Create
(name)
| 306 | * Benchmark: Object Create |
| 307 | */ |
| 308 | async function benchmarkObjectCreate(name) { |
| 309 | let counter = 0; |
| 310 | |
| 311 | return measureOperation({ |
| 312 | name, |
| 313 | iterations: 1_000, |
| 314 | operation: async () => { |
| 315 | const TestObject = Parse.Object.extend('BenchmarkTest'); |
| 316 | const obj = new TestObject(); |
| 317 | obj.set('testField', `test-value-${counter++}`); |
| 318 | obj.set('number', counter); |
| 319 | obj.set('boolean', true); |
| 320 | await obj.save(); |
| 321 | }, |
| 322 | }); |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * Benchmark: Object Read (by ID) |
nothing calls this directly
no test coverage detected