From 3428d9a3948f58773efa76df94c46824406b7354 Mon Sep 17 00:00:00 2001 From: jasquat Date: Fri, 10 Mar 2023 10:52:37 -0500 Subject: [PATCH] add more details to cypress pilot script w/ burnettk --- spiffworkflow-frontend/bin/cypress_pilot | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-frontend/bin/cypress_pilot b/spiffworkflow-frontend/bin/cypress_pilot index 650368bf..f69dae06 100755 --- a/spiffworkflow-frontend/bin/cypress_pilot +++ b/spiffworkflow-frontend/bin/cypress_pilot @@ -30,9 +30,15 @@ if [[ -z "${CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK:-}" ]]; then export CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK=true fi -cypress_run_file="/var/tmp/cypress_run_$(date +%s)" +cypress_run_file="/var/tmp/cypress_run" echo "Recording stats to ${cypress_run_file}" +if [[ ! -f "$cypress_run_file" ]]; then + echo "success,duration,start_time,end_time,frontend_url" >"$cypress_run_file" +fi + +frontend_url="${SPIFFWORKFLOW_FRONTEND_URL:localhost}" + for attempt in $(seq 1 "$ATTEMPTS" ); do echo "Running attempt: ${attempt}" @@ -43,6 +49,6 @@ for attempt in $(seq 1 "$ATTEMPTS" ); do fi end_time=$(date +%s) - echo "${success},$(( end_time - start_time ))" >>"$cypress_run_file" + echo "${success},$(( end_time - start_time )),$(date "-d@${start_time}"),$(date "-d@${end_time}"),${frontend_url}" >>"$cypress_run_file" done echo "Recorded stats to ${cypress_run_file}"