1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/cli
Nayeem Rahman 5dbf5c8293
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-26 11:29:45 +02:00
..
args feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00
bench chore: remove third_party submodule (#20201) 2023-08-19 09:56:12 +05:30
cache chore(cli): remove atty crate (#20275) 2023-08-25 07:43:07 -06:00
js fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-26 11:29:45 +02:00
lsp fix(lsp): implement deno.suggest.completeFunctionCalls (#20214) 2023-08-26 02:53:44 +02:00
napi chore: forward v1.36.3 release commit to main (#20270) 2023-08-24 17:53:01 +00:00
npm fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-23 17:03:05 -06:00
ops build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
schemas feat(ext/kv): connect to remote database (#20178) 2023-08-22 13:56:00 +08:00
standalone refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 09:53:52 +00:00
tests fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-26 11:29:45 +02:00
tools fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-26 11:29:45 +02:00
tsc fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-26 11:29:45 +02:00
util chore(cli): remove atty crate (#20275) 2023-08-25 07:43:07 -06:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs build: remove redundant rerun-if-changed for compiler snapshot (#20094) 2023-08-08 09:21:54 +02:00
Cargo.toml chore: fully remove atty dep (#20288) 2023-08-25 17:40:21 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs chore: forward v1.36.3 release commit to main (#20270) 2023-08-24 17:53:01 +00:00
emit.rs refactor(lsp): move config file related code to config.rs (#19790) 2023-07-10 21:45:09 +00:00
errors.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
factory.rs refactor: use "deno_config" crate (#20260) 2023-08-24 11:21:34 +02:00
file_fetcher.rs refactor: use deno_cache_dir crate (#20092) 2023-08-08 14:23:02 +00:00
graph_util.rs feat(unstable): optional deno_modules directory (#19977) 2023-08-02 00:49:09 +00:00
http_util.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
js.rs build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
main.rs fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-23 17:03:05 -06:00
module_loader.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
node.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 09:53:52 +00:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
worker.rs refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 09:53:52 +00:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.