summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
authorevan <github@evan.lol>2022-04-20 22:06:39 +0300
committerGitHub <noreply@github.com>2022-04-20 21:06:39 +0200
commitf785ecee1a68faac517a6d35763dd26ef033d722 (patch)
treeae0bca3d8cf79088b42b0b8d9a9a5efbe89a27b0 /cli/dts/lib.deno.unstable.d.ts
parent2612b6f20fc21fb92402aa9086d13a7192ae3814 (diff)
feat(bench): update API, new console reporter (#14305)
This commit changes "deno bench" subcommand, by updating the "Deno.bench" API as follows: - remove "Deno.BenchDefinition.n" - remove "Deno.BenchDefintion.warmup" - add "Deno.BenchDefinition.group" - add "Deno.BenchDefintion.baseline" This is done because bench cases are no longer run fixed amount of iterations, but instead they are run until there is difference between subsequent runs that is statistically insiginificant. Additionally, console reporter was rewritten completely, to looks similar to "hyperfine" reporter.
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 564a7a073..0ad070469 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -8,14 +8,12 @@ declare namespace Deno {
fn: () => void | Promise<void>;
name: string;
ignore?: boolean;
- /** Specify number of iterations benchmark should perform. Defaults to 1000. */
- n?: number;
- /** Specify number of warmup iterations benchmark should perform. Defaults
- * to 1000.
- *
- * These iterations are not measured. It allows the code to be optimized
- * by JIT compiler before measuring its performance. */
- warmup?: number;
+ /** Group name for the benchmark.
+ * Grouped benchmarks produce a time summary */
+ group?: string;
+ /** Benchmark should be used as the baseline for other benchmarks
+ * If there are multiple baselines in a group, the first one is used as the baseline */
+ baseline?: boolean;
/** If at least one bench has `only` set to true, only run benches that have
* `only` set to true and fail the bench suite. */
only?: boolean;