Skip to content

feat(scaletest/templates): add support for concurrent scenarios #11753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Prev Previous commit
Next Next commit
stagger delay mins
  • Loading branch information
mafredri committed Jan 30, 2024
commit 74812f68e73384d643f3433e2d4439701d3f280c
6 changes: 3 additions & 3 deletions scaletest/templates/scaletest-runner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ data "coder_parameter" "load_scenario_run_concurrently" {
mutable = true
}

data "coder_parameter" "load_scenario_concurrency_staggering" {
data "coder_parameter" "load_scenario_concurrency_stagger_delay_mins" {
order = 25
name = "Load Scenario Concurrency Staggering"
name = "Load Scenario Concurrency Stagger Delay"
type = "number"
default = 3
description = "The number of minutes to wait between starting each load scenario when run concurrently."
Expand Down Expand Up @@ -596,7 +596,7 @@ resource "coder_agent" "main" {
SCALETEST_PARAM_CLEANUP_PREPARE : data.coder_parameter.cleanup_prepare.value ? "1" : "0",
SCALETEST_PARAM_LOAD_SCENARIOS : data.coder_parameter.load_scenarios.value,
SCALETEST_PARAM_LOAD_SCENARIO_RUN_CONCURRENTLY : data.coder_parameter.load_scenario_run_concurrently.value ? "1" : "0",
SCALETEST_PARAM_LOAD_SCENARIO_CONCURRENCY_STAGGERING : "${data.coder_parameter.load_scenario_concurrency_staggering.value}",
SCALETEST_PARAM_LOAD_SCENARIO_CONCURRENCY_STAGGER_DELAY_MINS : "${data.coder_parameter.load_scenario_concurrency_stagger_delay_mins.value}",
SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_DURATION : "${data.coder_parameter.load_scenario_ssh_traffic_duration.value}",
SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_BYTES_PER_TICK : "${data.coder_parameter.load_scenario_ssh_bytes_per_tick.value}",
SCALETEST_PARAM_LOAD_SCENARIO_SSH_TRAFFIC_TICK_INTERVAL : "${data.coder_parameter.load_scenario_ssh_tick_interval.value}",
Expand Down
2 changes: 1 addition & 1 deletion scaletest/templates/scaletest-runner/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ for scenario in "${SCALETEST_PARAM_LOAD_SCENARIOS[@]}"; do
pid_to_scenario+=(["${pids[-1]}"]="${scenario}")
# Stagger the start of each scenario to avoid a burst of load and deted
# problematic scenarios.
sleep $((SCALETEST_PARAM_LOAD_SCENARIO_CONCURRENCY_STAGGERING * 60))
sleep $((SCALETEST_PARAM_LOAD_SCENARIO_CONCURRENCY_STAGGER_DELAY_MINS * 60))
continue
fi

Expand Down