Skip to content

Instantly share code, notes, and snippets.

@ckampfe
Created December 3, 2020 02:00
Show Gist options
  • Save ckampfe/bdd73517c332fac3ade3aea9a2f3a148 to your computer and use it in GitHub Desktop.
Save ckampfe/bdd73517c332fac3ade3aea9a2f3a148 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
last_n=$1
commits=$(git log -n "$last_n" | awk '$1 == "commit" { print $2 }')
for commit in $commits
do
git checkout "$commit" >/dev/null 2>&1
cargo clean >/dev/null 2>&1
RUSTFLAGS="-C target-cpu=native" cargo install --path . --force >/dev/null 2>&1
hyperfine -w1 -r3 "jindex ~/code/sf-city-lots-json/citylots.json > /dev/null" |
awk -v commit="$commit" '$1 == "Time" { print commit, "\t", $5 }'
done
git checkout master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment