From f785ecee1a68faac517a6d35763dd26ef033d722 Mon Sep 17 00:00:00 2001 From: evan Date: Wed, 20 Apr 2022 22:06:39 +0300 Subject: 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. --- cli/tests/testdata/bench/fail.out | 105 ++++++++++---------------------------- 1 file changed, 26 insertions(+), 79 deletions(-) (limited to 'cli/tests/testdata/bench/fail.out') diff --git a/cli/tests/testdata/bench/fail.out b/cli/tests/testdata/bench/fail.out index 9779a27fe..cc92a08b4 100644 --- a/cli/tests/testdata/bench/fail.out +++ b/cli/tests/testdata/bench/fail.out @@ -1,81 +1,28 @@ Check [WILDCARD]/bench/fail.ts -running 10 benches from [WILDCARD]/bench/fail.ts -bench bench0 ... 1000 iterations FAILED ([WILDCARD]) -bench bench1 ... 1000 iterations FAILED ([WILDCARD]) -bench bench2 ... 1000 iterations FAILED ([WILDCARD]) -bench bench3 ... 1000 iterations FAILED ([WILDCARD]) -bench bench4 ... 1000 iterations FAILED ([WILDCARD]) -bench bench5 ... 1000 iterations FAILED ([WILDCARD]) -bench bench6 ... 1000 iterations FAILED ([WILDCARD]) -bench bench7 ... 1000 iterations FAILED ([WILDCARD]) -bench bench8 ... 1000 iterations FAILED ([WILDCARD]) -bench bench9 ... 1000 iterations FAILED ([WILDCARD]) - -failures: - -bench0 -Error - at [WILDCARD]/bench/fail.ts:2:9 - at [WILDCARD] - -bench1 -Error - at [WILDCARD]/bench/fail.ts:5:9 - at [WILDCARD] - -bench2 -Error - at [WILDCARD]/bench/fail.ts:8:9 - at [WILDCARD] - -bench3 -Error - at [WILDCARD]/bench/fail.ts:11:9 - at [WILDCARD] - -bench4 -Error - at [WILDCARD]/bench/fail.ts:14:9 - at [WILDCARD] - -bench5 -Error - at [WILDCARD]/bench/fail.ts:17:9 - at [WILDCARD] - -bench6 -Error - at [WILDCARD]/bench/fail.ts:20:9 - at [WILDCARD] - -bench7 -Error - at [WILDCARD]/bench/fail.ts:23:9 - at [WILDCARD] - -bench8 -Error - at [WILDCARD]/bench/fail.ts:26:9 - at [WILDCARD] - -bench9 -Error - at [WILDCARD]/bench/fail.ts:29:9 - at [WILDCARD] - -failures: - - bench0 - bench1 - bench2 - bench3 - bench4 - bench5 - bench6 - bench7 - bench8 - bench9 - -bench result: FAILED. 0 passed; 10 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) - +cpu: [WILDCARD] +runtime: deno [WILDCARD] ([WILDCARD]) + +[WILDCARD]/bench/fail.ts +benchmark time (avg) (min … max) p75 p99 p995 +------------------------------------------------- ----------------------------- +bench0 error: Error +[WILDCARD] +bench1 error: Error +[WILDCARD] +bench2 error: Error +[WILDCARD] +bench3 error: Error +[WILDCARD] +bench4 error: Error +[WILDCARD] +bench5 error: Error +[WILDCARD] +bench6 error: Error +[WILDCARD] +bench7 error: Error +[WILDCARD] +bench8 error: Error +[WILDCARD] +bench9 error: Error +[WILDCARD] error: Bench failed -- cgit v1.2.3