Use StopTimer in site benchmarks

This commit is contained in:
Bjørn Erik Pedersen 2017-12-05 16:17:11 +01:00
parent a2d81ce983
commit 84805a68ca
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -133,8 +133,9 @@ func BenchmarkSiteBuilding(b *testing.B) {
func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) { func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) {
b.Run(conf.String(), func(b *testing.B) { b.Run(conf.String(), func(b *testing.B) {
b.StopTimer()
sites := createHugoBenchmarkSites(b, b.N, conf) sites := createHugoBenchmarkSites(b, b.N, conf)
b.ResetTimer() b.StartTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
h := sites[0] h := sites[0]