Skip to content

Commit 7707771

Browse files
BenWiederhakesylvestre
authored andcommitted
shuf: document new benchmark category
1 parent bf93582 commit 7707771

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/uu/shuf/BENCHMARKING.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ a range of numbers to randomly sample from. An example of a command that works
2828
well for testing:
2929

3030
```shell
31-
hyperfine --warmup 10 "target/release/shuf -i 0-10000000"
31+
hyperfine --warmup 10 "target/release/shuf -i 0-10000000 > /dev/null"
3232
```
3333

3434
To measure the time taken by shuffling an input file, the following command can
35-
be used::
35+
be used:
3636

3737
```shell
3838
hyperfine --warmup 10 "target/release/shuf input.txt > /dev/null"
@@ -49,5 +49,14 @@ should be benchmarked separately. In this case, we have to pass the `-n` flag or
4949
the command will run forever. An example of a hyperfine command is
5050

5151
```shell
52-
hyperfine --warmup 10 "target/release/shuf -r -n 10000000 -i 0-1000"
52+
hyperfine --warmup 10 "target/release/shuf -r -n 10000000 -i 0-1000 > /dev/null"
53+
```
54+
55+
## With huge interval ranges
56+
57+
When `shuf` runs with huge interval ranges, special care must be taken, so it
58+
should be benchmarked separately also. An example of a hyperfine command is
59+
60+
```shell
61+
hyperfine --warmup 10 "target/release/shuf -n 100 -i 1000-2000000000 > /dev/null"
5362
```

0 commit comments

Comments
 (0)