OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 set -e | 3 set -e |
4 | 4 |
5 BRANCH=$(git branch | grep \* | cut -d" " -f 2) | 5 BRANCH=$(git branch | grep \* | cut -d" " -f 2) |
6 CLEAN=${CLEAN-clean} | 6 CLEAN=${CLEAN-clean} |
7 SAMPLES=100 | 7 SAMPLES=100 |
8 | 8 |
9 if [ $BRANCH == $CLEAN ]; then | 9 if [ "$BRANCH" = "$CLEAN" ]; then |
10 echo "Comparing $BRANCH to itself." | 10 echo "Comparing $BRANCH to itself." |
11 exit 1 | 11 exit 1 |
12 fi | 12 fi |
13 | 13 |
14 if [ ! -f $CLEAN.log ]; then | 14 if [ ! -f $CLEAN.log ]; then |
15 git checkout $CLEAN | 15 git checkout $CLEAN |
16 ./gyp_skia >/dev/null | 16 ./gyp_skia >/dev/null |
17 ninja -C out/Release nanobench | 17 ninja -C out/Release nanobench |
18 out/Release/nanobench $@ --samples $SAMPLES -v 2> $CLEAN.log | 18 out/Release/nanobench $@ --samples $SAMPLES -v 2> $CLEAN.log |
19 fi | 19 fi |
20 | 20 |
21 git checkout $BRANCH | 21 git checkout $BRANCH |
22 ./gyp_skia >/dev/null | 22 ./gyp_skia >/dev/null |
23 ninja -C out/Release nanobench | 23 ninja -C out/Release nanobench |
24 out/Release/nanobench $@ --samples $SAMPLES -v 2> $BRANCH.log | 24 out/Release/nanobench $@ --samples $SAMPLES -v 2> $BRANCH.log |
25 | 25 |
26 compare $CLEAN.log $BRANCH.log | 26 ./bin/compare $CLEAN.log $BRANCH.log |
OLD | NEW |