1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/tests
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
..
config chore: move test_util/std to tests/util/std (#22402) 2024-02-13 09:22:49 -07:00
ffi chore: move test_ffi and test_nap to tests/ [WIP] (#22394) 2024-02-12 13:46:50 -07:00
integration refactor(lsp): unify config file data into ConfigTree (#23032) 2024-03-26 15:52:20 +00:00
napi chore: move test_ffi and test_nap to tests/ [WIP] (#22394) 2024-02-12 13:46:50 -07:00
node_compat fix(ext/node): Reimplement StringDecoder to match node's behavior (#22933) 2024-03-15 17:24:13 -07:00
specs fix(bench): Fix group header printing logic + don't filter out the warmup benchmark (#23083) 2024-03-26 09:19:24 -07:00
testdata fix(cli): output more detailed information for steps when using JUnit reporter (#22797) 2024-03-26 00:08:46 +09:00
unit fix(ext/web): Fix structuredClone Web API type declaration (any -> generic) (#22968) 2024-03-25 22:44:49 +01:00
unit_node fix(ext/node): handle null in stdio array (#23048) 2024-03-24 06:55:53 +01:00
util chore(lsp): add tests for compiler options being resolved relative the config file (#22924) 2024-03-15 14:27:43 +00:00
wpt chore: update WPT expectations (#22838) 2024-03-10 23:15:37 +01:00
Cargo.toml chore(tests): Introduce integration tests for jupyter subcommand (#23074) 2024-03-25 17:53:50 -07:00
lib.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
README.md chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00

Deno Integration Tests