Skip to content

Commit 08dc362

Browse files
Enable countErrorMargin parameter for waitForRunningPodsMeasurement. (#34)
1 parent 4381eee commit 08dc362

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clusterloader2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_VERSION=1.22
1+
ARG GOLANG_VERSION=1.24
22
FROM golang:${GOLANG_VERSION} AS builder
33

44
WORKDIR /root/perf-tests/clusterloader2

clusterloader2/pkg/measurement/common/wait_for_pods.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
const (
3131
defaultWaitForPodsTimeout = 60 * time.Second
3232
defaultWaitForPodsInterval = 5 * time.Second
33+
defaultCountErrorMargin = 0
3334
defaultIsFatal = false
3435
waitForRunningPodsMeasurementName = "WaitForRunningPods"
3536
)
@@ -54,6 +55,10 @@ func (w *waitForRunningPodsMeasurement) Execute(config *measurement.Config) ([]m
5455
if err != nil {
5556
return nil, err
5657
}
58+
countErrorMargin, err := util.GetIntOrDefault(config.Params, "countErrorMargin", defaultCountErrorMargin)
59+
if err != nil {
60+
return nil, err
61+
}
5762
selector := util.NewObjectSelector()
5863
if err := selector.Parse(config.Params); err != nil {
5964
return nil, err
@@ -76,6 +81,7 @@ func (w *waitForRunningPodsMeasurement) Execute(config *measurement.Config) ([]m
7681
defer cancel()
7782
options := &measurementutil.WaitForPodOptions{
7883
DesiredPodCount: func() int { return desiredPodCount },
84+
CountErrorMargin: countErrorMargin,
7985
CallerName: w.String(),
8086
WaitForPodsInterval: refreshInterval,
8187
}

0 commit comments

Comments
 (0)