diff options
Diffstat (limited to 'std/testing/bench_example.ts')
-rw-r--r-- | std/testing/bench_example.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/std/testing/bench_example.ts b/std/testing/bench_example.ts index 401516cca..366521f85 100644 --- a/std/testing/bench_example.ts +++ b/std/testing/bench_example.ts @@ -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/ }); +} |