summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-31 10:35:02 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-31 10:35:02 +0300
commitd74452cfe8f69a85ec83e05481e16bebf199a5cb (patch)
tree5c6196fdba2771043eacde8c145b26bfdd90a656 /hugolib
parent978951cf52b697f60f3ecfacf3322b460ff3abf9 (diff)
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 'hugolib')
-rw-r--r--hugolib/site_benchmark_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/site_benchmark_test.go b/hugolib/site_benchmark_test.go
index e6df9f709..985bc8eef 100644
--- a/hugolib/site_benchmark_test.go
+++ b/hugolib/site_benchmark_test.go
@@ -33,7 +33,8 @@ type siteBuildingBenchmarkConfig struct {
}
func (s siteBuildingBenchmarkConfig) String() string {
- return fmt.Sprintf("frontmatter=%s|num_root_sections=%d|num_pages=%d|tags_per_page=%d|shortcodes=%t|render=%t", s.Frontmatter, s.RootSections, s.NumPages, s.TagsPerPage, s.Shortcodes, s.Render)
+ // Make it comma separated with no spaces, so it is both Bash and regexp friendly.
+ return fmt.Sprintf("frontmatter=%s,num_root_sections=%d,num_pages=%d,tags_per_page=%d,shortcodes=%t,render=%t", s.Frontmatter, s.RootSections, s.NumPages, s.TagsPerPage, s.Shortcodes, s.Render)
}
func BenchmarkSiteBuilding(b *testing.B) {