nix: add group to postgrest-loadtest-report

This is so the results are easier to skim
This commit is contained in:
steve-chavez
2025-06-17 17:58:49 -05:00
parent 7dbb8cd987
commit bc99ec8285
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ jobs:
- name: Run loadtest
run: |
postgrest-loadtest-against -k ${{ matrix.kind }} main ${{ steps.get-latest-tag.outputs.tag }}
postgrest-loadtest-report >> "$GITHUB_STEP_SUMMARY"
postgrest-loadtest-report -g ${{ matrix.kind }} >> "$GITHUB_STEP_SUMMARY"
flake:
strategy:
+7 -2
View File
@@ -219,17 +219,22 @@ let
{
name = "postgrest-loadtest-report";
docs = "Create a report of all loadtest reports as markdown.";
args = [
"ARG_OPTIONAL_SINGLE([group], [g], [Marker to group results])"
];
workingDir = "/";
}
''
echo -e '## Loadtest results\n'
marker=''${_arg_group:+$_arg_group}
echo -e "## Loadtest results ($marker)\n"
find loadtest -type f -iname '*.bin' -exec ${reporter} {} \; \
| ${jq}/bin/jq '[paths(scalars) as $path | {param: $path | join("."), (.branch): getpath($path)}]' \
| ${jq}/bin/jq --slurp 'flatten | group_by(.param) | map(add)' \
| ${toMarkdown}
echo -e '\n\n## Process monitoring results\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 -e 'If a branch finishes its loadtest in less seconds than another branch, it will have blank cells for the missing seconds.\n'