Skip to content

Commit

Permalink
fix: limiter bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jayantxie committed May 28, 2024
1 parent b8897fa commit 3053d51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (r *Runner) benching(onceFn RunOnce, concurrent, qps int, total int64) {
r.counter.Reset(total)
var qpsLimiter *ratelimit.Bucket
if qps > 0 {
qpsLimiter = ratelimit.NewBucketWithRate(float64(qps), 100)
qpsLimiter = ratelimit.NewBucketWithRate(float64(qps), int64(concurrent))
}
for i := 0; i < concurrent; i++ {
go func() {
Expand Down
4 changes: 2 additions & 2 deletions scripts/reports/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def diff(from_csv, to_csv):
result.append(diff_cell(from_reader[line_num][3], line[3])) # tps
result.append(diff_cell(from_reader[line_num][4], line[4])) # p99
result.append(diff_cell(from_reader[line_num][5], line[5])) # p999
result.append(diff_cell(from_reader[line_num][6], line[6])) # Client CPU
result.append(diff_cell(from_reader[line_num][7], line[7])) # Server CPU
result.append(diff_cell(from_reader[line_num][6], line[6])) # Server CPU
result.append(diff_cell(from_reader[line_num][7], line[7])) # Client CPU

results.append(result)

Expand Down

0 comments on commit 3053d51

Please sign in to comment.