Trend metrics in end-of-test summary

Please suggest populating of trend custom variable into an end-of-test summary.

I create trend variable for server-timing stats returned in response headers.

let serverTiming = new Trend(‘serverTiming’);

This part of code parses headers and adds value to trend with tags.

response.headers[“Server-Timing”].split(’,’).forEach(el => {
let value = String(el).match(/dur=(.+?);/);
let name = String(el).match(/desc="(.+?)"/);
serverTiming.add(value[1],{name:name[1], type: page.type, version: data.version, hash: data.sha }) })

this solution works perfectly with InfluxDB but I want to see the values of each timing in the end-of-test summary.
It’s hard to create trend metrics for each timing metric because each page has a different set of returned timings. Timings list is quite big as well (20-30 items).

Hi there, welcome to the forum :slight_smile:

Well, the end-of-test summary is precisely that, a summary. It’s an aggregated report of the metrics produced in your test, so you really can’t see individual values there.

One thing you could do is to use the JSON output in addition to the InfluxDB output (you can use more than 1 output at a time) and then filter out and visualize the individual metrics from the JSON file using jq. Same thing with CSV or any other output you want.

For more advanced use cases you could write an output extension and process the individual metrics any way you like, but I think you should be fine with using the JSON or CSV outputs.