Last active
August 4, 2020 15:13
-
-
Save nbraud/fd1fea38f89a7b436fcd10d755040fad to your computer and use it in GitHub Desktop.
Benchmarking uutils/coreutils' factor too
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
echo "Commit id,Commit message,Mean (s),σ (s),Median (s),User (s),System (s),Min (s),Max (s)" > table.csv | |
for rev in $(git rev-list --reverse master..); do | |
git checkout "$rev" | |
cargo build --release | |
hyperfine --export-csv table.tmp.csv "seq 2 $((10 ** 7)) | ../../../target/release/factor > /dev/null" | |
{ echo -n "$(git show -q --format='%h,%s,')"; tail -n1 table.tmp.csv | cut -d, -f 2-; } >> table.csv | |
rm table.tmp.csv | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment