File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
hugo
2
2
docs /public *
3
+ /.idea
3
4
hugo.exe
4
5
* .test
5
6
* .prof
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+
4
+ # Convenience script to
5
+ # - For a given branch
6
+ # - Run benchmark tests for a given package
7
+ # - Do the same for master
8
+ # - then compare the two runs with benchcmp
9
+
10
+ if [ $# -ne 2 ]
11
+ then
12
+ echo " USAGE: ./bench.sh <git-branch> <package-to-bench>"
13
+ exit 1
14
+ fi
15
+
16
+
17
+ BRANCH=$1
18
+ PACKAGE=$2
19
+
20
+ git checkout $BRANCH
21
+ go test -test.run=NONE -bench=" .*" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE -$BRANCH .txt
22
+
23
+ git checkout master
24
+ go test -test.run=NONE -bench=" .*" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE -master.txt
25
+
26
+
27
+ benchcmp /tmp/bench-$PACKAGE -master.txt /tmp/bench-$PACKAGE -$BRANCH .txt
You can’t perform that action at this time.
0 commit comments