Skip to content

Commit ad70e60

Browse files
authored
Merge pull request #3428 from marseel/pr/marseel/fix_timelimit
tuningSet: fix TimeLimitedLoad for zero actions
2 parents ddea3fb + 6b4b01f commit ad70e60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clusterloader2/pkg/tuningset/time_limited.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ func newTimeLimitedLoad(params *api.TimeLimitedLoad) TuningSet {
3434
}
3535

3636
func (t *timeLimitedLoad) Execute(actions []func()) {
37+
if len(actions) == 0 {
38+
return
39+
}
3740
sleepDuration := time.Duration(t.params.TimeLimit.ToTimeDuration().Nanoseconds() / int64(len(actions)))
3841
var wg wait.Group
3942
for i := range actions {

0 commit comments

Comments
 (0)