Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-30 15:33:37 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-30 15:33:37 +0300
commitce624cc7d34c8b78aa482ae92a46d2cadc145b73 (patch)
treef9b350ecfc758c4d7512be55107042ff48a00001 /hugolib
parent8930e259d78cba4041b550cc51a7f40bc91d7c20 (diff)
hugolib: Add slightly more realistic tag distribution to benchmark
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/site_benchmark_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/site_benchmark_test.go b/hugolib/site_benchmark_test.go
index 1bb1f9206..a22f48654 100644
--- a/hugolib/site_benchmark_test.go
+++ b/hugolib/site_benchmark_test.go
@@ -131,8 +131,10 @@ category = "categories"
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 := "[]"