docs: mention HYPERFINE_ITERATION in README

This commit is contained in:
ded-furby committed 2026-06-02 01:25:13 +10:00
1 parent f12f3d9f86
commit 0d6ade930a
1 file changed
+6
+6
View File
@@ -87,6 +87,12 @@ option:
hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'
```
If you need a unique value for each individual run of a benchmark command, hyperfine also exposes
the zero-based `$HYPERFINE_ITERATION` environment variable inside the benchmarked command itself:
```sh
hyperfine 'my-command > output-${HYPERFINE_ITERATION}.log'
```
### Intermediate shell
By default, commands are executed using a predefined shell (`/bin/sh` on Unix, `cmd.exe` on Windows).