Skip to content

Commit

Permalink
optimize: warmup latency when set qps very small
Browse files Browse the repository at this point in the history
  • Loading branch information
jayantxie committed Aug 22, 2024
1 parent 5a47b36 commit 1e13e09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ func Main(name string, newer ClientNewer) {
handler := func() error { return cli.Send(method, action, payload) }

// === warming ===
r.Warmup(handler, concurrent, qps, 100*1000)
warmupTotal := 100 * 1000
if qps > 0 {
warmupTotal = qps * 2
}
r.Warmup(handler, concurrent, qps, int64(warmupTotal))

// === beginning ===
if err := cli.Send(method, BeginAction, "empty"); err != nil {
Expand Down

0 comments on commit 1e13e09

Please sign in to comment.