@@ -26,10 +26,16 @@ end_phase
26
26
27
27
wait_baseline " ${SCALETEST_PARAM_LOAD_SCENARIO_BASELINE_DURATION} "
28
28
29
+ non_greedy_agent_traffic_args=()
29
30
if [[ ${SCALETEST_PARAM_GREEDY_AGENT} != 1 ]]; then
30
31
greedy_agent () { : ; }
31
32
else
32
33
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
+ )
33
39
34
40
coder exp scaletest create-workspaces \
35
41
--count 1 \
59
65
set +e
60
66
coder exp scaletest workspace-traffic \
61
67
--template " ${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE} " \
68
+ --bytes-per-tick $(( 1024 * 1024 * 25 )) \
69
+ --tick-interval 40ms \
62
70
--timeout " $(( delay)) s" \
63
71
--job-timeout " $(( delay)) s" \
64
72
--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 \
67
75
" ${args[@]} "
68
76
status=${?}
77
+ show_json " ${SCALETEST_RESULTS_DIR} /traffic-${type} -greedy-agent.json"
69
78
79
+ export GRAFANA_ADD_TAGS=
80
+ if [[ ${status} != 0 ]]; then
81
+ GRAFANA_ADD_TAGS=error
82
+ fi
70
83
annotate_grafana_end greedy_agent " ${scenario} : Greedy agent"
71
84
72
85
return ${status}
@@ -89,7 +102,8 @@ for scenario in "${SCALETEST_PARAM_LOAD_SCENARIOS[@]}"; do
89
102
--tick-interval " ${SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_TICK_INTERVAL} ms" \
90
103
--timeout " ${SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_DURATION} m" \
91
104
--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[@]} "
93
107
status=$?
94
108
wait
95
109
status2=$?
@@ -106,7 +120,8 @@ for scenario in "${SCALETEST_PARAM_LOAD_SCENARIOS[@]}"; do
106
120
--tick-interval " ${SCALETEST_PARAM_LOAD_SCENARIO_WEB_TERMINAL_TRAFFIC_TICK_INTERVAL} ms" \
107
121
--timeout " ${SCALETEST_PARAM_LOAD_SCENARIO_WEB_TERMINAL_TRAFFIC_DURATION} m" \
108
122
--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[@]} "
110
125
status=$?
111
126
wait
112
127
status2=$?
0 commit comments