File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -342,9 +342,9 @@ function sampleModule(modulePath) {
342
342
343
343
clock(7, module.measure); // warm up
344
344
global.gc();
345
- process.nextTick(() => {
345
+ process.nextTick(async () => {
346
346
const memBaseline = process.memoryUsage().heapUsed;
347
- const clocked = clock(module.count, module.measure);
347
+ const clocked = await clock(module.count, module.measure);
348
348
process.send({
349
349
name: module.name,
350
350
clocked: clocked / module.count,
@@ -353,10 +353,10 @@ function sampleModule(modulePath) {
353
353
});
354
354
355
355
// Clocks the time taken to execute a test per cycle (secs).
356
- function clock(count, fn) {
356
+ async function clock(count, fn) {
357
357
const start = process.hrtime.bigint();
358
358
for (let i = 0; i < count; ++i) {
359
- fn();
359
+ await fn();
360
360
}
361
361
return Number(process.hrtime.bigint() - start);
362
362
}
You can’t perform that action at this time.
0 commit comments