Skip to content

Commit 3cd0934

Browse files
nix(loadtest): additionally group results by status code and method
This gives us a much better idea immediately when looking at the report. It also allows us to differentiate between different return codes on the same URI, which might come in handy when dealing with expired JWT and such. A nice side-effect: All the error-related requests are now grouped together in the 4xx section.
1 parent 1d2e429 commit 3cd0934

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nix/tools/loadtest.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ let
260260
}
261261
''
262262
${vegeta}/bin/vegeta encode "$_arg_file" \
263-
| ${jq}/bin/jq --slurp 'map(select(.url != "")) | group_by(.url) | map({(.[0].url | sub("^http://postgrest";"")): map(.latency) | min / 10e3 }) | .[]' \
263+
| ${jq}/bin/jq --slurp 'map(select(.url != "")) | group_by("\(.code) \(.method) \(.url)") | map({("\(.[0].code) \(.[0].method) \(.[0].url)" | sub("http://postgrest";"")): map(.latency) | min / 10e3 }) | .[]' \
264264
| ${jq}/bin/jq --arg branch "$(basename "$_arg_file" .bin)" '. + {branch: $branch}'
265265
'';
266266

0 commit comments

Comments
 (0)