nix: add traces to loadtest commands

This commit is contained in:
steve-chavez
2025-06-19 15:04:16 -05:00
parent 330df05891
commit e1c71c92d6
2 changed files with 9 additions and 6 deletions
+5 -5
View File
@@ -145,7 +145,7 @@ let
cat << EOF cat << EOF
Running loadtest on "$tgt"... Running "$_arg_kind" loadtest on "$tgt"...
EOF EOF
@@ -168,7 +168,7 @@ let
cat << EOF cat << EOF
Running loadtest on HEAD... Running "$_arg_kind" loadtest on HEAD...
EOF EOF
@@ -225,16 +225,16 @@ let
workingDir = "/"; workingDir = "/";
} }
'' ''
marker=''${_arg_group:+$_arg_group} marker=''${_arg_group:+"($_arg_group)"}
echo -e "## Loadtest results ($marker)\n" echo -e "## Loadtest results $marker\n"
find loadtest -type f -iname '*.bin' -exec ${reporter} {} \; \ find loadtest -type f -iname '*.bin' -exec ${reporter} {} \; \
| ${jq}/bin/jq '[paths(scalars) as $path | {param: $path | join("."), (.branch): getpath($path)}]' \ | ${jq}/bin/jq '[paths(scalars) as $path | {param: $path | join("."), (.branch): getpath($path)}]' \
| ${jq}/bin/jq --slurp 'flatten | group_by(.param) | map(add)' \ | ${jq}/bin/jq --slurp 'flatten | group_by(.param) | map(add)' \
| ${toMarkdown} | ${toMarkdown}
echo -e "\n\n## Process monitoring results ($marker)\n" echo -e "\n\n## Process monitoring results $marker\n"
echo 'Tracks the memory and CPU usage in 1 second intervals for the duration of the loadtest.' echo 'Tracks the memory and CPU usage in 1 second intervals for the duration of the loadtest.'
echo -e 'If a branch finishes its loadtest in less seconds than another branch, it will have blank cells for the missing seconds.\n' echo -e 'If a branch finishes its loadtest in less seconds than another branch, it will have blank cells for the missing seconds.\n'
+4 -1
View File
@@ -364,7 +364,10 @@ let
fi fi
echo "done." echo "done."
echo -n "Starting postgrest... " ver=$($PGRST_CMD ${legacyConfig} --version)
echo -n "Starting $ver... "
$PGRST_CMD ${legacyConfig} > "$tmpdir"/run.log 2>&1 & $PGRST_CMD ${legacyConfig} > "$tmpdir"/run.log 2>&1 &
pid=$! pid=$!
# shellcheck disable=SC2317 # shellcheck disable=SC2317