Skip to content

Commit

Permalink
fix: make sure teardownCore is called after all the benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Aug 1, 2023
1 parent c4eed4c commit f585981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/benchmark.js-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async function runBenchmarks({

console.log(` ✔ Measured ${uri}`);
benchmarkCompletedListeners.forEach((listener) => listener());
teardownCore();
}
teardownCore();
console.log(`[CodSpeed] Done running ${benches.length} benches.`);
}
2 changes: 1 addition & 1 deletion packages/tinybench-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ export function withCodSpeed(bench: Bench): Bench {
// print results
console.log(` ✔ Measured ${uri}`);
}
teardownCore();
console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);
return bench.tasks;
};
teardownCore();
return bench;
}

Expand Down

0 comments on commit f585981

Please sign in to comment.