Skip to content

Commit

Permalink
do not start/stop benchmark timer for no-ops
Browse files Browse the repository at this point in the history
  • Loading branch information
rade committed Dec 7, 2017
1 parent f305c35 commit d3e23e1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/benchmark_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
}
Expand Down

0 comments on commit d3e23e1

Please sign in to comment.