diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-30 15:33:37 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-30 15:33:37 +0300 |
commit | ce624cc7d34c8b78aa482ae92a46d2cadc145b73 (patch) | |
tree | f9b350ecfc758c4d7512be55107042ff48a00001 /hugolib | |
parent | 8930e259d78cba4041b550cc51a7f40bc91d7c20 (diff) |
hugolib: Add slightly more realistic tag distribution to benchmark
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/site_benchmark_test.go | 4 |
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 := "[]" |