shithub: hugo

Download patch

ref: ce624cc7d34c8b78aa482ae92a46d2cadc145b73
parent: 8930e259d78cba4041b550cc51a7f40bc91d7c20
author: Bjørn Erik Pedersen <[email protected]>
date: Tue May 30 11:33:37 EDT 2017

hugolib: Add slightly more realistic tag distribution to benchmark

--- a/hugolib/site_benchmark_test.go
+++ b/hugolib/site_benchmark_test.go
@@ -131,8 +131,10 @@
 		tags                = make([]string, cfg.TagsPerPage)
 	)
 
+	tagOffset := rand.Intn(10)
+
 	for i := 0; i < len(tags); i++ {
-		tags[i] = fmt.Sprintf("Hugo %d", i)
+		tags[i] = fmt.Sprintf("Hugo %d", i+tagOffset)
 	}
 
 	tagsStr := "[]"