Skip to content

Fix RPS threshold calculations

Grant Young requested to merge gy-fix-rps-thresholds into master

Noticed today that we're calculating our RPS numbers wrong, specifically for RPS rates less than 1.

This mainly only affected RPS Mean that we only use for display purposes. The tests themselves internally were using correct limits.

The issue specifically is when an RPS target is under 1 we round up to ensure k6 has a round number to run with but we were also using the same logic for calculating the RPS Mean to be displayed in results, meaning that any threshold under 1 would always show as 0.8. MR fixes this and simplifies the logic.

Before:

  execution: local--------------------------------------------------]   servertor
     output: -
     script: k6/tests/web/web_project_file_blame.js

    duration: -, iterations: -
         vus: 1, max: 20

time="2020-07-07T10:37:07Z" level=info------------------------------] starting
time="2020-07-07T10:37:07Z" level=info msg="Web Protocol RPS: 20"
time="2020-07-07T10:37:07Z" level=info msg="RPS Threshold: 0.80/s (10)"

After:

  execution: local--------------------------------------------------]   servertor
     output: -
     script: k6/tests/web/web_project_file_blame.js

    duration: -, iterations: -
         vus: 1, max: 20

time="2020-07-07T11:57:18+01:00" level=info-------------------------] starting
time="2020-07-07T11:57:18+01:00" level=info msg="Web Protocol RPS: 20"
time="2020-07-07T11:57:18+01:00" level=info msg="RPS Threshold: 0.16/s (10)"

Pipeline running with changes - https://gitlab.com/gitlab-org/quality/performance/-/pipelines/163888097

Edited by Grant Young

Merge request reports

Loading