deno/cli
Nathan Whitaker a2a537e196
fix(bench): Fix group header printing logic + don't filter out the warmup benchmark (#23083)
Fixes #23053.
Two small bugs here:
- the existing condition for printing out the group header was broken.
it worked in the reproducer (in the issue above) without filtering only
by accident, due to setting `self.has_ungrouped = true` once we see the
warmup bench. Knowing that we sort benchmarks to put ungrouped benches
first, there are only two cases: 1) we are starting the first group 2)
we are ending the previous group and starting a new group
- when you passed `--filter` we were applying that filter to the warmup
bench (which is not visible to users), so we suffered from jit bias if
you were filtering (unless your filter was `<warmup>`)

TLDR;

Running
```bash
deno bench main.js --filter="G"
```
```js
// main.js
Deno.bench({
  group: "G1",
  name: "G1-A",
  fn() {},
});

Deno.bench({
  group: "G1",
  name: "G1-B",
  fn() {},
});
```


Before this PR:
```
benchmark      time (avg)        iter/s             (min … max)       p75       p99      p995
--------------------------------------------------------------- -----------------------------

G1-A          303.52 ps/iter3,294,726,102.1     (254.2 ps … 7.8 ns) 287.5 ps 391.7 ps 437.5 ps
G1-B             3.8 ns/iter 263,360,635.9     (2.24 ns … 8.36 ns) 3.84 ns 4.73 ns 4.94 ns

summary
  G1-A
   12.51x faster than G1-B
```

After this PR:
```
benchmark      time (avg)        iter/s             (min … max)       p75       p99      p995
--------------------------------------------------------------- -----------------------------

group G1
G1-A            3.85 ns/iter 259,822,096.0     (2.42 ns … 9.03 ns) 3.83 ns 4.62 ns 4.83 ns
G1-B            3.84 ns/iter 260,458,274.5     (3.55 ns … 7.05 ns) 3.83 ns 4.45 ns 4.7 ns

summary
  G1-B
   1x faster than G1-A
```
2024-03-26 09:19:24 -07:00
..
args refactor(lsp): unify config file data into ConfigTree (#23032) 2024-03-26 15:52:20 +00:00
bench chore(ext/io): remove use of deprecated Deno.writeSync() (#22872) 2024-03-20 10:39:25 -07:00
cache feat(node): load ES modules defined as CJS (#22945) 2024-03-21 11:35:51 -07:00
js fix: don't panic in test and bench if ops not available (#23055) 2024-03-24 16:16:45 -07:00
lsp refactor(lsp): unify config file data into ConfigTree (#23032) 2024-03-26 15:52:20 +00:00
napi chore: Forward 1.41.3 release commit (#22930) 2024-03-14 21:23:24 +00:00
npm perf: hard link npm cache (#22773) 2024-03-07 13:10:19 -05:00
ops refactor(bench): align ops to testing ops (#23038) 2024-03-24 06:22:37 +01:00
schemas fix(config): remove pkg name example and add pattern to schema (#22813) 2024-03-08 23:13:25 +00:00
standalone perf(cli): use args_os (#23039) 2024-03-22 14:03:56 -07:00
tools fix(bench): Fix group header printing logic + don't filter out the warmup benchmark (#23083) 2024-03-26 09:19:24 -07:00
tsc refactor(lsp): unify config file data into ConfigTree (#23032) 2024-03-26 15:52:20 +00:00
util chore(cli): move away from PathBuf in clap (#22036) 2024-03-14 23:53:46 +00:00
auth_tokens.rs fix(cli): Add IP address support to DENO_AUTH_TOKEN (#22297) 2024-02-06 19:45:40 +01:00
build.rs chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-06 08:33:15 +05:30
Cargo.toml chore(tests): Introduce integration tests for jupyter subcommand (#23074) 2024-03-25 17:53:50 -07:00
cdp.rs refactor(tools/repl): reorganize code (#21810) 2024-01-05 16:14:58 +01:00
deno_std.rs chore: Forward 1.41.3 release commit (#22930) 2024-03-14 21:23:24 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
emit.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 03:15:22 +00:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs fix: upgrade to deno_ast 0.33 (#22341) 2024-02-09 01:40:26 +00:00
factory.rs chore: enable clippy unused_async rule (#22834) 2024-03-11 23:48:00 -04:00
file_fetcher.rs fix: handle cache body file not existing when using etag (#22931) 2024-03-15 09:57:24 -04:00
graph_util.rs fix: stop type checking during runtime (#22854) 2024-03-13 16:38:01 -04:00
http_util.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
integration_tests_runner.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00
js.rs chore(cli): remove problematic snapshot test (#22722) 2024-03-05 19:11:33 -07:00
jsr.rs feat(unstable/pm): support npm packages in 'deno add' (#22715) 2024-03-06 13:24:15 +00:00
main.rs perf(cli): use args_os (#23039) 2024-03-22 14:03:56 -07:00
mainrt.rs perf(cli): use args_os (#23039) 2024-03-22 14:03:56 -07:00
module_loader.rs chore: upgrade deno_core to 0.272.0 (#23022) 2024-03-21 13:57:32 -07:00
node.rs feat(node): load ES modules defined as CJS (#22945) 2024-03-21 11:35:51 -07:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat(node): load ES modules defined as CJS (#22945) 2024-03-21 11:35:51 -07:00
version.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
worker.rs fix(ext/node): worker_threads doesn't exit if there are message listeners (#22944) 2024-03-15 21:38:16 +01: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.