Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pkg/workload/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,11 @@ func runRun(gen workload.Generator, urls []string, dbName string) error {
for i, workFn := range ops.WorkerFns {
go func(i int, workFn func(context.Context) error) {
// If a ramp period was specified, start all of the workers
// gradually with a new context.
// gradually.
if rampCtx != nil {
rampPerWorker := *ramp / time.Duration(len(ops.WorkerFns))
time.Sleep(time.Duration(i) * rampPerWorker)
workerRun(rampCtx, errCh, nil /* wg */, limiter, workFn)
}

// Start worker again, this time with the main context.
workerRun(workersCtx, errCh, &wg, limiter, workFn)
}(i, workFn)
}
Expand Down