Skip to content

Commit

Permalink
Change timing
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefMarlin committed Sep 1, 2023
1 parent 504adc6 commit 985880e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/objectPredict/example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ func bench(config objectPredict.Config, num int) {
stats := prettyTimer.NewTimingStats()

for i := 0; i < num; i++ {
start := time.Now()
stats.Start()
_, _, err = obj.Predict(img)
if err != nil {
fmt.Println("Cannot predict:", err)
return
}
// End timer
stats.RecordTiming(time.Since(start))
stats.Finish()
}
stats.PrintStats()
}
Expand Down

0 comments on commit 985880e

Please sign in to comment.