Skip to content

Instantly share code, notes, and snippets.

@soonhokong
Forked from ggreer/ag_bench.sh
Created October 22, 2015 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soonhokong/b68780deb18e9569848c to your computer and use it in GitHub Desktop.
Save soonhokong/b68780deb18e9569848c to your computer and use it in GitHub Desktop.
My ag benchmark script
#!/bin/bash
function benchmark_rev() {
REV=$1
git clean -f &> /dev/null
git checkout $REV &> /dev/null
git clean -f &> /dev/null
if [ $? -ne 0 ]; then
echo "Checkout of $REV failed!"
exit 1
fi
./build.sh &> /dev/null
if [ $? -ne 0 ]; then
echo "[\"$REV\", null, \"Build failed\" 0, 0, 0],"
fi
# grep to filter out occasional debugging lines I printed out
TIME1=`./ag --stats test_blah ~/code/ 2>&1 | grep seconds | tail -n 1 | awk '{print $1}'`
TIME2=`./ag --stats test.*blah ~/code/ 2>&1 | grep seconds | tail -n 1 | awk '{print $1}'`
TIME3=`./ag --stats -i test_blah ~/code/ 2>&1 | grep seconds | tail -n 1 | awk '{print $1}'`
echo "[\"$REV\", null, null, $TIME1, $TIME2, $TIME3],"
}
# 6a38fb74 is the first rev that supports --stats
REV_LIST=`git tag -l`
#REV_LIST=`git rev-list 6a38fb74..master`
for rev in $REV_LIST; do
benchmark_rev $rev
done
ggreer@lithium:~/code/ag_bench% (cd ~/code/ag_bench && ~/code/ag_bench.sh)
["0.1", null, null, 1.001633, 1.631091, 1.017701],
["0.10", null, null, 0.763842, 1.615246, 0.808023],
["0.11", null, null, 1.235985, 1.357743, 1.259668],
["0.11.1", null, null, 1.200022, 1.253596, 1.299099],
["0.12", null, null, 1.255163, 1.442904, 1.234107],
["0.13", null, null, 6.158059, 2.545001, 1.907842],
["0.13.1", null, null, 2.049180, 2.481677, 2.139254],
["0.14", null, null, 1.222442, 3.000790, 1.176523],
["0.15", null, null, 1.185306, 3.028995, 1.180626],
["0.16", null, null, 0.837831, 2.575671, 0.836985],
["0.17", null, null, 0.847137, 2.665753, 0.850668],
["0.18", null, null, 0.859553, 2.636032, 0.842441],
["0.18.1", null, null, 0.896250, 2.798171, 0.846742],
["0.19", null, null, 0.838449, 2.627847, 0.846029],
["0.19.1", null, null, 0.891764, 2.606627, 0.841891],
["0.19.2", null, null, 0.847564, 2.696162, 0.849447],
["0.2", null, null, 1.969113, 1.624481, 2.395560],
["0.20.0", null, null, 0.847484, 2.632252, 0.859535],
["0.21.0", null, null, 0.666094, 1.851302, 0.645187],
["0.22.0", null, null, 0.652891, 1.892765, 0.648804],
["0.23.0", null, null, 0.634957, 1.913793, 0.639309],
["0.24.0", null, null, 0.686461, 1.693142, 0.671811],
["0.24.1", null, null, 0.666866, 1.782930, 0.672476],
["0.25.0", null, null, 0.661119, 1.798989, 0.651225],
["0.26.0", null, null, 0.633770, 1.589416, 0.632845],
["0.27.0", null, null, 0.636943, 1.564976, 0.646831],
["0.28.0", null, null, 0.623304, 0.971198, 0.634498],
["0.29.0", null, null, 0.435085, 0.901865, 0.429725],
["0.29.1", null, null, 0.460201, 0.922172, 0.433077],
["0.3", null, null, 1.961987, 1.621685, 2.409575],
["0.30.0", null, null, 0.446269, 0.897211, 0.434208],
["0.31.0", null, null, 0.431769, 0.902187, 0.444410],
["0.4", null, null, 1.985284, 1.622212, 2.405403],
["0.5", null, null, 1.684513, 1.325853, 2.117057],
["0.6", null, null, 1.668946, 1.320201, 2.105070],
["0.7", null, null, 1.672355, 1.331546, 2.115892],
["0.7.1", null, null, 1.669368, 1.322453, 2.104730],
["0.7.2", null, null, 1.668183, 1.318711, 2.103670],
["0.8", null, null, 1.666861, 1.332219, 2.104007],
["0.9", null, null, 0.728709, 1.335850, 0.768944],
ggreer@lithium:~/code/ag_bench%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment