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/clear_timeout.out | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 cli/tests/testdata/bench/clear_timeout.out (limited to 'cli/tests/testdata/bench/clear_timeout.out') diff --git a/cli/tests/testdata/bench/clear_timeout.out b/cli/tests/testdata/bench/clear_timeout.out new file mode 100644 index 000000000..10aa47d75 --- /dev/null +++ b/cli/tests/testdata/bench/clear_timeout.out @@ -0,0 +1,8 @@ +Check [WILDCARD]/bench/clear_timeout.ts +running 3 benches from [WILDCARD]/bench/clear_timeout.ts +bench bench1 ... 1000 iterations [WILDCARD] ns/iter ([WILDCARD]..[WILDCARD] ns/iter) ok ([WILDCARD]) +bench bench2 ... 1000 iterations [WILDCARD] ns/iter ([WILDCARD]..[WILDCARD] ns/iter) ok ([WILDCARD]) +bench bench3 ... 1000 iterations [WILDCARD] ns/iter ([WILDCARD]..[WILDCARD] ns/iter) ok ([WILDCARD]) + +bench result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) + -- cgit v1.2.3