nushell/docs/commands/benchmark.md
JT bff81f24aa
Autogenerate missing docs (#3514)
* Autogenerate missing docs

* Update ansi.md

* Rename question mark command docs

* Delete empty?.md
2021-05-30 12:57:04 +12:00

557 B

benchmark

Runs a block and returns the time it took to execute it.

Usage

> benchmark <block> {flags} 

Parameters

  • <block> the block to run and benchmark

Flags

  • -h, --help: Display this help message
  • -p, --passthrough : Display the benchmark results and pass through the block's output

Examples

Benchmarks a command within a block

> benchmark { sleep 500ms }

Benchmarks a command within a block and passes its output through

> echo 45 | benchmark { sleep 500ms } --passthrough {}