shithub: hugo

Download patch

ref: 84805a68caca2f21a7a32f54ac4c1f6e0ada98ac
parent: a2d81ce983d45b5742c93bd472503c88286f099a
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Dec 5 11:17:11 EST 2017

Use StopTimer in site benchmarks

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