File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -379,20 +379,20 @@ function sampleModule(modulePath: string): BenchmarkSample {
379
379
import { benchmark } from '${ modulePath } ';
380
380
381
381
// warm up, it looks like 7 is a magic number to reliably trigger JIT
382
- benchmark.measure();
383
- benchmark.measure();
384
- benchmark.measure();
385
- benchmark.measure();
386
- benchmark.measure();
387
- benchmark.measure();
388
- benchmark.measure();
382
+ await benchmark.measure();
383
+ await benchmark.measure();
384
+ await benchmark.measure();
385
+ await benchmark.measure();
386
+ await benchmark.measure();
387
+ await benchmark.measure();
388
+ await benchmark.measure();
389
389
390
390
const memBaseline = process.memoryUsage().heapUsed;
391
391
392
392
const resourcesStart = process.resourceUsage();
393
393
const startTime = process.hrtime.bigint();
394
394
for (let i = 0; i < benchmark.count; ++i) {
395
- benchmark.measure();
395
+ await benchmark.measure();
396
396
}
397
397
const timeDiff = Number(process.hrtime.bigint() - startTime);
398
398
const resourcesEnd = process.resourceUsage();
You can’t perform that action at this time.
0 commit comments