Is there away to add counter to a batch request? I would really benefit from seeing how many responses for each url I received. Currently metrics are shown for whole batch. I am running a whole lot of parallel requests but would like more granularity per each url.
Apologies if it’s a silly question, I’m very new to k6
http.batch() returns either an object or array of responses, one for each request you made, and in case of an array are in the same order as the passed requests. See the documentation. So you can add a counter, or process these responses however you like.
You can also correlate a response with the request using the Response.request property. See the Response documentation.