mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-16 03:49:52 +00:00
do not start/stop benchmark timer for no-ops
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user