diff --git a/src/uu/shuf/BENCHMARKING.md b/src/uu/shuf/BENCHMARKING.md index 58eefc499..d16b1afb0 100644 --- a/src/uu/shuf/BENCHMARKING.md +++ b/src/uu/shuf/BENCHMARKING.md @@ -28,11 +28,11 @@ a range of numbers to randomly sample from. An example of a command that works well for testing: ```shell -hyperfine --warmup 10 "target/release/shuf -i 0-10000000" +hyperfine --warmup 10 "target/release/shuf -i 0-10000000 > /dev/null" ``` To measure the time taken by shuffling an input file, the following command can -be used:: +be used: ```shell 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 the command will run forever. An example of a hyperfine command is ```shell -hyperfine --warmup 10 "target/release/shuf -r -n 10000000 -i 0-1000" +hyperfine --warmup 10 "target/release/shuf -r -n 10000000 -i 0-1000 > /dev/null" +``` + +## With huge interval ranges + +When `shuf` runs with huge interval ranges, special care must be taken, so it +should be benchmarked separately also. An example of a hyperfine command is + +```shell +hyperfine --warmup 10 "target/release/shuf -n 100 -i 1000-2000000000 > /dev/null" ```