|
13 | 13 | - name: cl2-branch |
14 | 14 | description: "The branch of clusterloader2 you want to use" |
15 | 15 | default: "steady-load" |
16 | | - - name: cl2-scheduler-throughput-pods |
17 | | - default: 500000 |
18 | 16 | - name: cl2-scheduler-throughput-threshold |
19 | 17 | description: "scheduler throughput threshold" |
20 | 18 | default: "150" |
|
33 | 31 | description: The region where the cluster is in. |
34 | 32 | - name: cluster-name |
35 | 33 | description: The name of the EKS cluster you want to spin. |
| 34 | + - name: control-plane-tier |
| 35 | + default: "standard" |
36 | 36 | results: |
37 | 37 | - name: datapoint |
38 | 38 | description: Stores the CL2 result that can be consumed by other tasks (e.g. cloudwatch) |
@@ -83,17 +83,57 @@ spec: |
83 | 83 | script: | |
84 | 84 | #!/bin/bash |
85 | 85 |
|
86 | | - TOTAL_CYCLES=1 |
| 86 | + TIER=$(params.control-plane-tier) |
| 87 | + ITERATIONS=0 |
| 88 | +
|
| 89 | + case $TIER in |
| 90 | + "tier-xl") |
| 91 | + ITERATIONS=4 |
| 92 | + ;; |
| 93 | + "tier-2xl") |
| 94 | + ITERATIONS=8 |
| 95 | + ;; |
| 96 | + "tier-4xl") |
| 97 | + ITERATIONS=16 |
| 98 | + ;; |
| 99 | + *) |
| 100 | + echo "Unknown tier: $TIER. Defaulting to 1 iteration." |
| 101 | + ITERATIONS=1 |
| 102 | + ;; |
| 103 | + esac |
| 104 | +
|
87 | 105 | cat $(workspaces.source.path)/perf-tests/clusterloader2/testing/scheduler-throughput/config.yaml |
88 | 106 | cd $(workspaces.source.path)/perf-tests/clusterloader2/ |
89 | 107 |
|
90 | | - ENABLE_EXEC_SERVICE=false ./clusterloader --kubeconfig=$KUBECONFIG --testconfig=$(workspaces.source.path)/perf-tests/clusterloader2/testing/sustained-scheduler-throughput/config.yaml --testoverrides=$(workspaces.source.path)/overrides.yaml --nodes=$(params.nodes) --provider=eks --report-dir=$(workspaces.results.path) --alsologtostderr --v=2 |
| 108 | + FAIL_COUNT=0 |
| 109 | + for ((i=1; i<=ITERATIONS; i++)); do |
| 110 | + echo "--- Starting iteration $i of $ITERATIONS ---" |
| 111 | +
|
| 112 | + ENABLE_EXEC_SERVICE=false ./clusterloader --kubeconfig=$KUBECONFIG --testconfig=$(workspaces.source.path)/perf-tests/clusterloader2/testing/sustained-scheduler-throughput/config.yaml --testoverrides=$(workspaces.source.path)/overrides.yaml --nodes=$(params.nodes) --provider=eks --report-dir=$(workspaces.results.path) --alsologtostderr --v=2 |
| 113 | +
|
| 114 | + if [ $? -ne 0 ]; then |
| 115 | + echo "Iteration $i failed." |
| 116 | + ((FAIL_COUNT++)) |
| 117 | + else |
| 118 | + echo "Iteration $i passed." |
| 119 | + fi |
| 120 | + done |
| 121 | +
|
| 122 | + FAILURE_RATE=$(( (FAIL_COUNT * 100) / ITERATIONS )) |
| 123 | +
|
| 124 | + echo "------------------------------------------" |
| 125 | + echo "Total Iterations: $ITERATIONS" |
| 126 | + echo "Total Failures: $FAIL_COUNT" |
| 127 | + echo "Failure Rate: $FAILURE_RATE%" |
| 128 | + echo "------------------------------------------" |
91 | 129 |
|
92 | | - exit_code=$? |
93 | | - if [ $exit_code -eq 0 ]; then |
94 | | - echo "1" | tee $(results.datapoint.path) |
| 130 | + exit_code=0 |
| 131 | + if [ "$FAILURE_RATE" -ge 25 ]; then |
| 132 | + echo "Error: Failure rate ($FAILURE_RATE%) exceeded the 25% threshold." |
| 133 | + exit_code=1 |
95 | 134 | else |
96 | | - echo "0" | tee $(results.datapoint.path) |
| 135 | + echo "Success: Failure rate ($FAILURE_RATE%) is within acceptable limits." |
| 136 | + exit_code=0 |
97 | 137 | fi |
98 | 138 | ls -a $(workspaces.results.path) |
99 | 139 | cat $(workspaces.results.path)/SchedulingThroughput* |
|
0 commit comments