aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchSite.sh
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-05-31 10:35:02 +0300
committerBjørn Erik Pedersen <[email protected]>2017-05-31 10:35:02 +0300
commitd74452cfe8f69a85ec83e05481e16bebf199a5cb (patch)
tree5c6196fdba2771043eacde8c145b26bfdd90a656 /benchSite.sh
parent978951cf52b697f60f3ecfacf3322b460ff3abf9 (diff)
downloadhugo-d74452cfe8f69a85ec83e05481e16bebf199a5cb.tar.gz
hugo-d74452cfe8f69a85ec83e05481e16bebf199a5cb.zip
Add benchSite.sh
And change site benchmark separator to comma to make it Bash and regexp friendly, example: ./benchSite.sh "frontmatter=YAML,num_root_sections=1,num_pages=.*,tags_per_page=20,shortcodes=false,render=false"
Diffstat (limited to 'benchSite.sh')
-rwxr-xr-xbenchSite.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchSite.sh b/benchSite.sh
new file mode 100755
index 000000000..c59453336
--- /dev/null
+++ b/benchSite.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "frontmatter=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}"
+
+go test -run="NONE" -bench="BenchmarkSiteBuilding/${1}" -test.benchmem=true ./hugolib \ No newline at end of file