From: Bjørn Erik Pedersen Date: Tue, 30 May 2017 12:33:37 +0000 (+0300) Subject: hugolib: Add slightly more realistic tag distribution to benchmark X-Git-Tag: v0.22~41 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ce624cc7;p=brevno-suite%2Fhugo hugolib: Add slightly more realistic tag distribution to benchmark --- diff --git a/hugolib/site_benchmark_test.go b/hugolib/site_benchmark_test.go index 1bb1f920..a22f4865 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 := "[]"