Question about the end-of-test summary

Hi, could anyone explain to me if the aggregated HTTP metrics include ALL HTTP requests in your test case including the ones in the setup and teardown stages or if it only aggregates the HTTP requests in the execution stage?

If the aggregated metrics are calculated across all requests in all stages, is there a way to exclude the HTTP requests in the setup and teardown stages from the aggregate calculation?

All metrics in the setup stage are tagged with

"group"="::setup"

You can also create a custom summary from within the script:

You can probably put these things together to get your desired result. Not sure if there is an easier way to do so.

1 Like

Hi @alex,
as @pearsone said you can filter by the group that k6 implicitly defines. There is a section in the k6 documentation explaining in detail this workaround. Workaround to calculate iteration_duration.

We link it from the Builtin Metrics page.

Let me know if it helps.