shithub: hugo

Download patch

ref: 01e54609e78479aa793c64bc32feb66a3dacfade
parent: 5800a20a258378440e203a6c4a4343f5077755df
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Oct 7 16:41:25 EDT 2017

metrics: Reset benchmark timer

--- a/metrics/metrics_test.go
+++ b/metrics/metrics_test.go
@@ -44,6 +44,7 @@
 	s1 := "Hugo is cool and " + strings.Repeat("fun ", 10) + "!"
 	s2 := "Hugo is cool and " + strings.Repeat("cool ", 10) + "!"
 
+	b.ResetTimer()
 	for i := 0; i < b.N; i++ {
 		howSimilar(s1, s2)
 	}