blob: fca46d40f6ab0693401e4b33295ddc1e36359da6 [file] [log] [blame]
mtklein7ba39cb2014-11-24 12:39:59 -08001#!/bin/sh
2
3set -e
4
5BRANCH=$(git branch | grep \* | cut -d" " -f 2)
6CLEAN=${CLEAN-clean}
7SAMPLES=100
8
kkinnunenc77f6af2015-05-15 05:35:50 -07009if [ "$BRANCH" = "$CLEAN" ]; then
mtklein7ba39cb2014-11-24 12:39:59 -080010 echo "Comparing $BRANCH to itself."
11 exit 1
12fi
13
mtklein205de462015-01-23 10:39:55 -080014if [ ! -f $CLEAN.log ]; then
15 git checkout $CLEAN
mtklein24a592c2015-10-28 09:45:44 -070016 python gyp_skia >/dev/null
mtklein205de462015-01-23 10:39:55 -080017 ninja -C out/Release nanobench
18 out/Release/nanobench $@ --samples $SAMPLES -v 2> $CLEAN.log
19fi
mtklein7ba39cb2014-11-24 12:39:59 -080020
21git checkout $BRANCH
mtklein24a592c2015-10-28 09:45:44 -070022python gyp_skia >/dev/null
mtklein7ba39cb2014-11-24 12:39:59 -080023ninja -C out/Release nanobench
24out/Release/nanobench $@ --samples $SAMPLES -v 2> $BRANCH.log
25
mtklein24a592c2015-10-28 09:45:44 -070026python bin/compare $CLEAN.log $BRANCH.log