To capture k6 metrics for each request in a single script

Hi @varshagawande

It is not possible to achieve what you’re looking for at the moment with k6. We have a GitHub issue tracking this feature, but no ETA on its delivery. The text summary generated by k6 can only display aggregated values for all the http requests made in the context of a text run at the moment.

As a matter of fact, you’re not the first user asking how to do exactly that, and this very forum already has some nice pointers on possible workarounds:

In a nutshell, the most common workaround is to define tags on each of your requests and define a dummy threshold on them. That should lead to the outcome you wish. Otherwise, like ned pointed out at the time, you could use one of other k6 outputs (JSON/CSV, InfluxDB, Prometheus), and export the data there; that would allow you to make fine-grained queries on exactly the information you want.

Maybe an important piece of information to help you move forward is that the reason why you see those specific percentiles, min, max, … values, is because under the hood k6 uses a Trend metric.

Hope that’s helpful, let me know if I can be of more assistance :bowing_man:

PS: a note for the future, please refrain from pigging other k6 team members when your tickets are already assigned. This is a community forum, for the k6 open-source project, and we offer our support here on a voluntarily basis. Much appreciated :bowing_man: