Use StopTimer in site benchmarks
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Dec 2017 15:17:11 +0000 (16:17 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Dec 2017 15:17:11 +0000 (16:17 +0100)
hugolib/site_benchmark_test.go

index d7f300369c08e5916c78c3d4f40d8134d431495d..30720e7ed0772aa392cf53150ca26fd3fe9b0a3b 100644 (file)
@@ -133,8 +133,9 @@ func BenchmarkSiteBuilding(b *testing.B) {
 
 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]