Skip to content
Snippets Groups Projects

migrate criterion benchmarks to PLNK

Merged STEVAN Antoine requested to merge migrate-criterion-benchmarks-to-plnk into main
1 file
+ 14
3
Compare changes
  • Side-by-side
  • Inline
+ 14
3
@@ -56,17 +56,28 @@ python scripts/plot/multi_bar.py --title "complex curve group operations" -l "ti
these are benchmarks that run a single measurement, implemented as _examples_ in
`examples/benches/`.
### trusted setup
```nushell
let degrees = seq 0 15 | each { 2 ** $in }
cargo run --example bench_setup -- --nb-measurements 10 ...$degrees
| lines
| each { from json }
| to ndjson # NOTE: see https://github.com/nushell/nushell/issues/12655
| save --force setup.ndjson
```
### commit
```nushell
let degrees = seq 0 15 | each { 2 ** $in }
let res = cargo run --example bench_commit -- --nb-measurements 10 ...$degrees
cargo run --example bench_commit -- --nb-measurements 10 ...$degrees
| lines
| each { from nuon }
| update times { each { $in / 1_000_000 * 1ms } }
| insert mean {|it| $it.times | math avg}
| insert stddev {|it| $it.times | into int | into float | math stddev | into int | into duration}
| update label { parse "degree {d}" | into record | get d | into int }
| rename --column { label: "x", name: "curve", mean: "measurement", stddev: "error" }
| to ndjson # NOTE: see https://github.com/nushell/nushell/issues/12655
| save --force commit.ndjson
```
```nushell
python scripts/plot/plot.py ...[
@@ -74,7 +85,7 @@ python scripts/plot/plot.py ...[
--x-label "degree"
--y-label "time (in ms)"
(
$res | group-by curve --to-table | update items { reject curve } | to json
open commit.ndjson | group-by curve --to-table | update items { reject curve } | to json
)
]
```
Loading