Setup-related http metrics

I perform some http calls in my setup step, but that isn’t tracked at all by the summary output - in terms of any of the http metrics including http_req_duration. Do I have to create a Trend metric just to track this for each http request in setup()?

How can I set this up almost like there is a “setup scenario” ?

I tried doing this

mySetupTrend.add(res.timings.duration, { scenario: “my_setup” });

But I feel there should be a better way, or I’m missing some tags.

Hi there,

I’m a bit confused by your question since the usual complaint about this behavior is that metrics from setup()/teardown() pollute the end-of-test summary, i.e. by default those metrics are included in the summary. See #891.

As mentioned in that issue and in the docs, metrics from these functions are tagged with "group": "::setup". The summary is just a specific type of an aggregate report, but you can have access to individual metrics and filter them out in whatever external system you need. So if you use an output to export the metrics to, say, JSON or InfluxDB, you could filter all metrics tagged with "group": "::setup" only or do any kind of custom aggregation you need there.