Skip to content

Commit 1278cbe

Browse files
committed
minor tweaks
1 parent bcb980d commit 1278cbe

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

scaletest/templates/scaletest-runner/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ data "coder_parameter" "num_workspaces" {
216216

217217
validation {
218218
min = 0
219-
max = 1000
219+
max = 2000
220220
}
221221
}
222222

scaletest/templates/scaletest-runner/scripts/run.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ end_phase
2626

2727
wait_baseline "${SCALETEST_PARAM_LOAD_SCENARIO_BASELINE_DURATION}"
2828

29+
non_greedy_agent_traffic_args=()
2930
if [[ ${SCALETEST_PARAM_GREEDY_AGENT} != 1 ]]; then
3031
greedy_agent() { :; }
3132
else
3233
echo "WARNING: Greedy agent enabled, this may cause the load tests to fail." >&2
34+
non_greedy_agent_traffic_args=(
35+
# Let the greedy agent traffic command be scraped.
36+
# --scaletest-prometheus-address 0.0.0.0:21113
37+
# --trace=false
38+
)
3339

3440
coder exp scaletest create-workspaces \
3541
--count 1 \
@@ -59,14 +65,21 @@ else
5965
set +e
6066
coder exp scaletest workspace-traffic \
6167
--template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \
68+
--bytes-per-tick $((1024 * 1024 * 25)) \
69+
--tick-interval 40ms \
6270
--timeout "$((delay))s" \
6371
--job-timeout "$((delay))s" \
6472
--output json:"${SCALETEST_RESULTS_DIR}/traffic-${type}-greedy-agent.json" \
65-
--bytes-per-tick $((1024 * 1024 * 25)) \
66-
--tick-interval 40ms \
73+
--scaletest-prometheus-address 0.0.0.0:21113 \
74+
--trace=false \
6775
"${args[@]}"
6876
status=${?}
77+
show_json "${SCALETEST_RESULTS_DIR}/traffic-${type}-greedy-agent.json"
6978

79+
export GRAFANA_ADD_TAGS=
80+
if [[ ${status} != 0 ]]; then
81+
GRAFANA_ADD_TAGS=error
82+
fi
7083
annotate_grafana_end greedy_agent "${scenario}: Greedy agent"
7184

7285
return ${status}
@@ -89,7 +102,8 @@ for scenario in "${SCALETEST_PARAM_LOAD_SCENARIOS[@]}"; do
89102
--tick-interval "${SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_TICK_INTERVAL}ms" \
90103
--timeout "${SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_DURATION}m" \
91104
--job-timeout "${SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_DURATION}m30s" \
92-
--output json:"${SCALETEST_RESULTS_DIR}/traffic-ssh.json"
105+
--output json:"${SCALETEST_RESULTS_DIR}/traffic-ssh.json" \
106+
"${non_greedy_agent_traffic_args[@]}"
93107
status=$?
94108
wait
95109
status2=$?
@@ -106,7 +120,8 @@ for scenario in "${SCALETEST_PARAM_LOAD_SCENARIOS[@]}"; do
106120
--tick-interval "${SCALETEST_PARAM_LOAD_SCENARIO_WEB_TERMINAL_TRAFFIC_TICK_INTERVAL}ms" \
107121
--timeout "${SCALETEST_PARAM_LOAD_SCENARIO_WEB_TERMINAL_TRAFFIC_DURATION}m" \
108122
--job-timeout "${SCALETEST_PARAM_LOAD_SCENARIO_WEB_TERMINAL_TRAFFIC_DURATION}m30s" \
109-
--output json:"${SCALETEST_RESULTS_DIR}/traffic-web-terminal.json"
123+
--output json:"${SCALETEST_RESULTS_DIR}/traffic-web-terminal.json" \
124+
"${non_greedy_agent_traffic_args[@]}"
110125
status=$?
111126
wait
112127
status2=$?

scaletest/templates/scaletest-runner/startup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ base64 -d <<<"${SCRIPTS_ZIP}" >/tmp/scripts.zip
1515
rm -rf "${SCRIPTS_DIR}" || true
1616
mkdir -p "${SCRIPTS_DIR}"
1717
unzip -o /tmp/scripts.zip -d "${SCRIPTS_DIR}"
18+
# Chmod to work around https://github.com/coder/coder/issues/10034
19+
chmod +x "${SCRIPTS_DIR}"/*.sh
1820
rm /tmp/scripts.zip
1921

2022
echo "Cloning coder/coder repo..."

0 commit comments

Comments
 (0)