do not start/stop benchmark timer for no-ops

This commit is contained in:
Matthias Radestock
2017-12-07 20:31:11 +00:00
parent f305c35bfd
commit d3e23e18fc

View File

@@ -42,8 +42,6 @@ func readReportFiles(path string) ([]report.Report, error) {
func BenchmarkReportUnmarshal(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
b.StopTimer()
b.StartTimer()
if _, err := readReportFiles(*benchReportPath); err != nil {
b.Fatal(err)
}
@@ -58,9 +56,8 @@ func BenchmarkReportMerge(b *testing.B) {
merger := NewSmartMerger()
b.ResetTimer()
for i := 0; i < b.N; i++ {
b.StopTimer()
b.StartTimer()
merger.Merge(reports)
}
}