nix(loadtest): group results by status, method and URL
Different requests hit different code paths and perform very differently. By looking at each request type separately, we should be able to get a much better idea of what kind of change in performance we're looking at and where the root cause might be. It will hopefully also allow us to migrate some of the other test-cases into the main loadtest.
This commit is contained in:
@@ -267,7 +267,8 @@ let
|
|||||||
workingDir = "/";
|
workingDir = "/";
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
${vegeta}/bin/vegeta report -type=json "$_arg_file" \
|
${vegeta}/bin/vegeta encode "$_arg_file" \
|
||||||
|
| ${jq}/bin/jq --slurp 'map(select(.url != "")) | group_by("\(.code) \(.method) \(.url)") | map({("\(.[0].code) \(.[0].method) \(.[0].url)" | sub("http://postgrest";"")): add | .latency / length | 10e6 / . }) | .[]' \
|
||||||
| ${jq}/bin/jq --arg branch "$(basename "$_arg_file" .bin)" '. + {branch: $branch}'
|
| ${jq}/bin/jq --arg branch "$(basename "$_arg_file" .bin)" '. + {branch: $branch}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -281,10 +282,10 @@ let
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
pd.read_json(sys.stdin) \
|
pd.read_json(sys.stdin) \
|
||||||
.set_index('param') \
|
.set_index('rate') \
|
||||||
.loc['rate'] \
|
.drop(['branch']) \
|
||||||
.convert_dtypes() \
|
.convert_dtypes() \
|
||||||
.to_markdown(sys.stdout, floatfmt='.0f')
|
.to_markdown(sys.stdout, floatfmt='.1f')
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
@@ -304,8 +305,8 @@ let
|
|||||||
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 | {rate: $path | join("."), (.branch): getpath($path)}]' \
|
||||||
| ${jq}/bin/jq --slurp 'flatten | group_by(.param) | map(add)' \
|
| ${jq}/bin/jq --slurp 'flatten | group_by(.rate) | map(add)' \
|
||||||
| ${toMarkdown}
|
| ${toMarkdown}
|
||||||
|
|
||||||
echo -e "\n\n## Loadtest elapsed seconds vs CPU/MEM usage $marker\n"
|
echo -e "\n\n## Loadtest elapsed seconds vs CPU/MEM usage $marker\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user