Skip to content

Commit 9713cea

Browse files
committed
Have benchmarked output go to a file
This is more realistic and allows to benchmark copy_file_range(2) performance.
1 parent 7991910 commit 9713cea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/benchmark.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ SCRIPTS=tests/fixtures/sed/script
2222
# Run hyperfine with the specified name and command and collect the results.
2323
bench_run()
2424
{
25-
if hyperfine --command-name "$1" --warmup 2 --export-csv out.csv "$2" ; then
25+
if hyperfine --command-name "$1" --warmup 2 --export-csv out.csv --output ./out.txt "$2" ; then
2626
# Output the results sans-heading.
2727
sed 1d out.csv >>"$OUT"
2828
else
2929
# Unable to run; output a named empty record.
3030
echo "$1,,,,,,," >>"$OUT"
3131
fi
3232

33-
rm out.csv
33+
rm out.csv out.txt
3434
}
3535

3636
# Shared heading

0 commit comments

Comments
 (0)