put Start/StopTimer() at right place
This commit is contained in:
@ -44,11 +44,11 @@ func run(b *testing.B, maxConcurrentCalls int, caller func(testpb.TestServiceCli
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
for i := 0; i < b.N; i++ {
|
||||
b.StartTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
ch <- i
|
||||
b.StopTimer()
|
||||
}
|
||||
b.StopTimer()
|
||||
close(ch)
|
||||
wg.Wait()
|
||||
conn.Close()
|
||||
|
Reference in New Issue
Block a user