hugo/benchSite.sh
Michael Henderson ea5e9e346c Add GOEXE to support building with different versions of go
Add a variable to the makefile and benchmark scripts to let users change the command used to build. Doesn't impact tools like govendor.
2017-07-16 00:35:15 +02:00

13 lines
521 B
Bash
Executable file

#!/bin/bash
# allow user to override go executable by running as GOEXE=xxx make ...
GOEXE="${GOEXE-go}"
# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
# Note the quotes, which will be needed for more complex expressions.
# The above will run all variations, but only for front matter YAML.
echo "Running with BenchmarkSiteBuilding/${1}"
"${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof