Skip to content

Commit 1932f91

Browse files
committed
add -> check
1 parent 1b4246d commit 1932f91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runner/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ func (r *Runner) Run(bench benchmark.Benchmark) error {
152152
case <-ctx.Done():
153153
return
154154
default:
155-
if r.opts.Events > 0 && totalEvents.Load() >= r.opts.Events {
155+
totalEvents.Add(1)
156+
if r.opts.Events > 0 && totalEvents.Load() > r.opts.Events {
156157
cancel()
157158
return
158159
}
159-
totalEvents.Add(1)
160160

161161
eventBegin = time.Now()
162162
reads, writes, others, errs, err := bench.Event(ctx)

0 commit comments

Comments
 (0)