1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00
denoland-deno/cli/tests/integration
Nayeem Rahman 19ab929e1c
fix(bench): explicit timers don't force high precision measurements (#20272)
Disables `BenchContext::start()` and `BenchContext::end()` for low
precision benchmarks (less than 0.01s per iteration). Prints a warning
when they are used in such benchmarks, suggesting to remove them.

```ts
Deno.bench("noop", { group: "noops" }, () => {});

Deno.bench("noop with start/end", { group: "noops" }, (b) => {
  b.start();
  b.end();
});
```

Before:
```
cpu: 12th Gen Intel(R) Core(TM) i9-12900K
runtime: deno 1.36.2 (x86_64-unknown-linux-gnu)

file:///home/nayeem/projects/deno/temp3.ts
benchmark                    time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------- -----------------------------


noop                          2.63 ns/iter 380,674,131.4    (2.45 ns … 27.78 ns)   2.55 ns   4.03 ns   5.33 ns
noop with start and end     302.47 ns/iter   3,306,146.0     (200 ns … 151.2 µs)    300 ns    400 ns    400 ns

summary
  noop
   115.14x faster than noop with start and end
```

After:
```
cpu: 12th Gen Intel(R) Core(TM) i9-12900K
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)

file:///home/nayeem/projects/deno/temp3.ts
benchmark                    time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------- -----------------------------


noop                          3.01 ns/iter 332,565,561.7    (2.73 ns … 29.54 ns)   2.93 ns   5.29 ns   7.45 ns
noop with start and end       7.73 ns/iter 129,291,091.5    (6.61 ns … 46.76 ns)   7.87 ns  13.12 ns  15.32 ns
Warning start() and end() calls in "noop with start and end" are ignored because it averages less than 0.01s per iteration. Remove them for better results.

summary
  noop
   2.57x faster than noop with start and end
```
2023-08-31 14:02:40 +02:00
..
bench_tests.rs fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-31 14:02:40 +02:00
bundle_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
cache_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
cert_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
check_tests.rs fix: do not include jsx without @ts-check in tsc roots (#19964) 2023-07-27 14:09:02 -04:00
compile_tests.rs refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 18:23:28 +05:30
coverage_tests.rs fix(lsp): handle import mapped node: specifier (#19956) 2023-07-26 22:52:31 +00:00
doc_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
eval_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
flags_tests.rs fix(cli): Fix the bug where the command description is not displayed. (#19604) 2023-06-28 02:57:20 +02:00
fmt_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
info_tests.rs fix: deno info should respect import map (#19781) 2023-07-25 18:23:43 +02:00
init_tests.rs fix(lsp): handle import mapped node: specifier (#19956) 2023-07-26 22:52:31 +00:00
inspector_tests.rs fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-24 09:01:07 -06:00
install_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
js_unit_tests.rs feat(ext/web): resourceForReadableStream (#20180) 2023-08-21 18:23:27 +05:30
lint_tests.rs feat: add support for globs in the config file and CLI arguments for files (#19102) 2023-05-23 03:39:59 +02:00
lsp_tests.rs fix(lsp): implement deno.suggest.completeFunctionCalls (#20214) 2023-08-31 14:02:40 +02:00
mod.rs refactor: move shared library tests to their own file (#18479) 2023-03-28 13:40:43 -04:00
node_compat_tests.rs feat(node): add polyfill for node:test module (#20002) 2023-08-02 01:17:38 +02:00
node_unit_tests.rs fix(node): repl._builtinLibs (#20046) 2023-08-04 14:30:48 +02:00
npm_tests.rs refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 18:23:28 +05:30
repl_tests.rs chore(repl): mark some tests as flaky (#19475) 2023-06-13 09:36:21 -04:00
run_tests.rs fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-24 09:01:07 -06:00
shared_library_tests.rs feat(node/os): implement getPriority, setPriority & userInfo (#19370) 2023-07-31 22:29:09 +02:00
task_tests.rs fix(npm): run pre and post tasks if present (#19178) 2023-05-18 15:51:17 -04:00
test_tests.rs fix(test): JUnit reporter includes file, line and column attributes (#20174) 2023-08-21 18:23:27 +05:30
upgrade_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
vendor_tests.rs feat(vendor): support for npm specifiers (#19186) 2023-05-19 22:39:27 +00:00
watcher_tests.rs fix: move Deno.serve to stable namespace (#19718) 2023-07-04 23:04:26 +00:00
worker_tests.rs fix: regression in workers using dynamic imports (#20006) 2023-08-02 01:19:44 +00:00