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/allow_none.out | 57 ++++++++------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) (limited to 'cli/tests/testdata/bench/allow_none.out') diff --git a/cli/tests/testdata/bench/allow_none.out b/cli/tests/testdata/bench/allow_none.out index 0eb2ba5a3..3fd649ebe 100644 --- a/cli/tests/testdata/bench/allow_none.out +++ b/cli/tests/testdata/bench/allow_none.out @@ -1,51 +1,22 @@ -[WILDCARD] -running 7 benches from [WILDCARD] -bench read ... 1000 iterations FAILED [WILDCARD] -bench write ... 1000 iterations FAILED [WILDCARD] -bench net ... 1000 iterations FAILED [WILDCARD] -bench env ... 1000 iterations FAILED [WILDCARD] -bench run ... 1000 iterations FAILED [WILDCARD] -bench ffi ... 1000 iterations FAILED [WILDCARD] -bench hrtime ... 1000 iterations FAILED [WILDCARD] - -failures: +Check [WILDCARD]/bench/allow_none.ts +cpu: [WILDCARD] +runtime: deno [WILDCARD] ([WILDCARD]) -read -PermissionDenied: Can't escalate parent thread permissions +[WILDCARD]/bench/allow_none.ts +benchmark time (avg) (min … max) p75 p99 p995 +------------------------------------------------- ----------------------------- +read error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -write -PermissionDenied: Can't escalate parent thread permissions +write error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -net -PermissionDenied: Can't escalate parent thread permissions +net error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -env -PermissionDenied: Can't escalate parent thread permissions +env error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -run -PermissionDenied: Can't escalate parent thread permissions +run error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -ffi -PermissionDenied: Can't escalate parent thread permissions +ffi error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -hrtime -PermissionDenied: Can't escalate parent thread permissions +hrtime error: PermissionDenied: Can't escalate parent thread permissions [WILDCARD] - -failures: - - read - write - net - env - run - ffi - hrtime - -bench result: FAILED. 0 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] +error: Bench failed -- cgit v1.2.3