MCPcopy Index your code
hub / github.com/parse-community/parse-server / benchmarkObjectCreate

Function benchmarkObjectCreate

benchmark/performance.js:308–323  ·  view source on GitHub ↗

* Benchmark: Object Create

(name)

Source from the content-addressed store, hash-verified

306 * Benchmark: Object Create
307 */
308async 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)

Callers

nothing calls this directly

Calls 1

measureOperationFunction · 0.85

Tested by

no test coverage detected