Skip to content

Commit

Permalink
match: reduce price benchmark time
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Nov 23, 2019
1 parent 111094d commit 1fa1d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions match/price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ func BenchmarkPriceCompare(b *testing.B) {
}

var compValue int
b.StartTimer()
for i := 0; i < b.N; i++ {
b.StartTimer()
compValue = firstPrice.Cmp(secondPrice)
b.StopTimer()
}
b.StopTimer()
if compValue == 0 {
b.Fatalf("The two prices %v and %v are not equal, benchmark failed", firstPrice, secondPrice)
return
Expand Down

0 comments on commit 1fa1d62

Please sign in to comment.