Skip to content

Commit 126bc44

Browse files
committed
clean up results json files
1 parent f336a0a commit 126bc44

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

scaletest/templates/scaletest-runner/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ data "archive_file" "scripts_zip" {
213213

214214
resource "coder_agent" "main" {
215215
arch = data.coder_provisioner.me.arch
216+
dir = local.scaletest_run_dir
216217
os = "linux"
217218
env = {
218219
VERBOSE : data.coder_parameter.verbose.value ? "1" : "0",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ fi
2424
start_phase "Cleanup (${event})"
2525
coder exp scaletest cleanup \
2626
--cleanup-job-timeout 15m \
27-
--cleanup-timeout 30m |
28-
tee "result-cleanup-${event}.txt"
27+
--cleanup-timeout 30m \
28+
| tee "${SCALETEST_RESULTS_DIR}/cleanup-${event}.txt"
2929
end_phase
3030

3131
if [[ $event = manual ]]; then

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ fi
1414
# Environment variables shared between scripts.
1515
SCALETEST_STATE_DIR="${SCALETEST_RUN_DIR}/state"
1616
SCALETEST_PHASE_FILE="${SCALETEST_STATE_DIR}/phase"
17+
SCALETEST_RESULTS_DIR="${SCALETEST_RUN_DIR}/results"
18+
1719

1820
coder() {
1921
maybedryrun "$DRY_RUN" command coder "${@}"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -euo pipefail
77
. "${SCRIPTS_DIR}/lib.sh"
88

99
mkdir -p "${SCALETEST_STATE_DIR}"
10+
mkdir -p "${SCALETEST_RESULTS_DIR}"
1011

1112
echo "Preparing scaletest workspace environment..."
1213
set_status Preparing

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ coder exp scaletest create-workspaces \
1616
--concurrency "${SCALETEST_CREATE_CONCURRENCY}" \
1717
--job-timeout 15m \
1818
--no-cleanup \
19-
--output json:"${SCALETEST_RUN_DIR}/result-create-workspaces.json"
20-
show_json "${SCALETEST_RUN_DIR}/result-create-workspaces.json"
19+
--output json:"${SCALETEST_RESULTS_DIR}/create-workspaces.json"
20+
show_json "${SCALETEST_RESULTS_DIR}/create-workspaces.json"
2121
end_phase
2222

2323
wait_baseline 5
@@ -28,8 +28,8 @@ coder exp scaletest workspace-traffic \
2828
--bytes-per-tick 10240 \
2929
--tick-interval 1s \
3030
--timeout 5m \
31-
--output json:"${SCALETEST_RUN_DIR}/result-ssh.json"
32-
show_json "${SCALETEST_RUN_DIR}/result-ssh.json"
31+
--output json:"${SCALETEST_RESULTS_DIR}/traffic-ssh.json"
32+
show_json "${SCALETEST_RESULTS_DIR}/traffic-ssh.json"
3333
end_phase
3434

3535
wait_baseline 5
@@ -39,8 +39,8 @@ coder exp scaletest workspace-traffic \
3939
--bytes-per-tick 10240 \
4040
--tick-interval 1s \
4141
--timeout 5m \
42-
--output json:"${SCALETEST_RUN_DIR}/result-reconnectingpty.json"
43-
show_json "${SCALETEST_RUN_DIR}/result-reconnectingpty.json"
42+
--output json:"${SCALETEST_RESULTS_DIR}/traffic-reconnectingpty.json"
43+
show_json "${SCALETEST_RESULTS_DIR}/traffic-reconnectingpty.json"
4444
end_phase
4545

4646
wait_baseline 5
@@ -49,8 +49,8 @@ start_phase "Dashboard traffic"
4949
coder exp scaletest dashboard \
5050
--count "${SCALETEST_NUM_WORKSPACES}" \
5151
--job-timeout 5m \
52-
--output json:"${SCALETEST_RUN_DIR}/result-dashboard.json"
53-
show_json "${SCALETEST_RUN_DIR}/result-dashboard.json"
52+
--output json:"${SCALETEST_RESULTS_DIR}/traffic-dashboard.json"
53+
show_json "${SCALETEST_RESULTS_DIR}/traffic-dashboard.json"
5454
end_phase
5555

5656
wait_baseline 5

0 commit comments

Comments
 (0)