summaryrefslogtreecommitdiffstats
path: root/benchSite.sh
diff options
context:
space:
mode:
Diffstat (limited to 'benchSite.sh')
-rwxr-xr-xbenchSite.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/benchSite.sh b/benchSite.sh
new file mode 100755
index 000000000..623086708
--- /dev/null
+++ b/benchSite.sh
@@ -0,0 +1,12 @@
+#!/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 -count 3 -cpuprofile cpu.prof