Skip to content

Commit

Permalink
Allow RPS > 1000
Browse files Browse the repository at this point in the history
If the RPS is higher that 1000 the Invoker will have a delay
of 0 which causes to not issue any request. This patch allows
RPS up to 1M and issues a error if the target RPS it to high.

Signed-off-by: David Schall <[email protected]>
  • Loading branch information
dhschall authored and shyamjesal committed Feb 9, 2024
1 parent 54daf7e commit b6058b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/invoker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ func runExperiment(endpoints []*endpoint.Endpoint, runDuration int, targetRPS fl
Start(TimeseriesDBAddr, endpoints, workflowIDs)

timeout := time.After(time.Duration(runDuration) * time.Second)
tick := time.Tick(time.Duration(1000/targetRPS) * time.Millisecond)
d := time.Duration(1000000/targetRPS) * time.Microsecond
if d <= 0 {
log.Fatalln("Target RPS is too high")
}
tick := time.Tick(d)
start := time.Now()
loop:
for {
Expand Down

0 comments on commit b6058b8

Please sign in to comment.