mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
Return results in benchmark promise (#5842)
This commit is contained in:
parent
fe7d6824c9
commit
6de59f1908
4 changed files with 199 additions and 53 deletions
|
@ -1,5 +1,5 @@
|
|||
// https://deno.land/std/testing/bench.ts
|
||||
import { BenchmarkTimer, bench, runIfMain } from "./bench.ts";
|
||||
import { BenchmarkTimer, bench, runBenchmarks } from "./bench.ts";
|
||||
|
||||
// Basic
|
||||
bench(function forIncrementX1e9(b: BenchmarkTimer): void {
|
||||
|
@ -26,4 +26,6 @@ bench(function throwing(b): void {
|
|||
});
|
||||
|
||||
// Bench control
|
||||
runIfMain(import.meta, { skip: /throw/ });
|
||||
if (import.meta.main) {
|
||||
runBenchmarks({ skip: /throw/ });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue