mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-28 19:00:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0143c9ef2e |
@@ -33,9 +33,8 @@ hyperfine 'sleep 0.3'
|
|||||||
```
|
```
|
||||||
|
|
||||||
Hyperfine will automatically determine the number of runs to perform for each command. By default,
|
Hyperfine will automatically determine the number of runs to perform for each command. By default,
|
||||||
it will perform *at least* 10 benchmarking runs and estimate a run count targeting roughly
|
it will perform *at least* 10 benchmarking runs and measure for at least 3 seconds. To change this,
|
||||||
3 seconds, including shell overhead and preparation and conclusion commands. To set an exact
|
you can use the `-r`/`--runs` option:
|
||||||
number of runs, you can use the `-r`/`--runs` option:
|
|
||||||
```sh
|
```sh
|
||||||
hyperfine --runs 5 'sleep 0.3'
|
hyperfine --runs 5 'sleep 0.3'
|
||||||
```
|
```
|
||||||
@@ -57,8 +56,8 @@ hyperfine --warmup 3 'grep -R TODO *'
|
|||||||
```
|
```
|
||||||
|
|
||||||
Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare`
|
Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare`
|
||||||
option to run a special command before *each* timing run. For example, to clear harddisk caches
|
option to run a special command before *each* timing run. For example, to clear Linux filesystem caches,
|
||||||
on Linux, you can run
|
you can run
|
||||||
```sh
|
```sh
|
||||||
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
|
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in new issue
Block a user