aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchSite.sh
blob: aae21231c7f5f7401c0f2533651a026c39676c7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

# allow user to override go executable by running as GOEXE=xxx make ...
GOEXE="${GOEXE-go}"

# Send in a regexp matching 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 -count 3 -cpuprofile cpu.prof