Skip to content

Commit

Permalink
Reset benchmark timer to get more accurate timings
Browse files Browse the repository at this point in the history
  • Loading branch information
kicdu committed Jul 16, 2017
1 parent 76ef252 commit 9d821b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tlsh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func BenchmarkFillBuckets(b *testing.B) {
b.Error(err)
}
f.Seek(0, 0)
b.ResetTimer()
for n := 0; n < b.N; n++ {
r := bufio.NewReader(f)
fillBuckets(r)
Expand All @@ -90,6 +91,7 @@ func BenchmarkQuartilePoints(b *testing.B) {
if err != nil {
b.Error(err)
}
b.ResetTimer()
for n := 0; n < b.N; n++ {
quartilePoints(buckets)
}
Expand Down

0 comments on commit 9d821b6

Please sign in to comment.