mirror of
https://github.com/nushell/nushell.git
synced 2025-06-08 19:17:16 +02:00
# Description Following #15843, I have tinkered more with it and realized that there are plenty of features from [hyperfine](https://github.com/sharkdp/hyperfine) that could be implemented pretty easily. - `--warmup` flag to do `n` runs without benchmarking first, useful to fill disk cache ```nu @example "use --warmup to fill the disk cache before benchmarking" { bench { fd } { jwalk . -k } -w 1 -n 10 } ``` - `--setup`, `--prepare`, `--cleanup`, `--conclude` flags to run code before/after benchmarks ```nu @example "use `--setup` to compile before benchmarking" { bench { ./target/release/foo } --setup { cargo build --release } } @example "use `--prepare` to benchmark rust compilation speed" { bench { cargo build --release } --prepare { cargo clean } } ``` - `--ignore-errors` to ignore any errors in the benchmarked commands - benchmarked commands are now `| ignore` so that externals don't fill the screen