From 09ae512ccb4d8a36a0c6c1a700b48fdd3f9fc6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 11 Mar 2022 23:07:02 +0100 Subject: feat: "deno bench" subcommand (#13713) This commit adds "deno bench" subcommand and "Deno.bench()" API that allows to register bench cases. The API is modelled after "Deno.test()" and "deno test" subcommand. Currently the output is rudimentary and bench cases and not subject to "ops" and "resource" sanitizers. Co-authored-by: evan --- cli/tests/testdata/bench/only.out | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 cli/tests/testdata/bench/only.out (limited to 'cli/tests/testdata/bench/only.out') diff --git a/cli/tests/testdata/bench/only.out b/cli/tests/testdata/bench/only.out new file mode 100644 index 000000000..3c9855560 --- /dev/null +++ b/cli/tests/testdata/bench/only.out @@ -0,0 +1,7 @@ +Check [WILDCARD]/bench/only.ts +running 1 bench from [WILDCARD]/bench/only.ts +bench only ... 1000 iterations [WILDCARD] ns/iter ([WILDCARD]..[WILDCARD] ns/iter) ok ([WILDCARD]) + +bench result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD]) + +error: Bench failed because the "only" option was used -- cgit v1.2.3