I’m running a browser-based load test and I’d like to understand the built in metrics that are emitted at the end of the test run.
My script is purely driven by k6 browser.
At the end of the run, I get something like:
What do the
http_req* metrics here mean, and which http calls?
Is that aggregate of all the http requests my browser made behind the scenes (including api polling) in the background?
Specifically, for http_req_duration (how long did the remote server take to process the request and respond) does this tell me that all the network calls behind the scenes (those you’d probably see in Devtools > network >fetch/xhr) took this much time?
✓ http_req_duration....................................: avg=166.81ms min=31µs med=96.42ms max=15.11s p(90)=246.55ms p(95)=327.19ms
Thanks in advance for helping me understand these!
Hey @icedlatte !
In the current released versions of k6/k6 browser (I guess you are using v0.43 → v0.45) these HTTP metrics that you mention record both, HTTP module metrics, and HTTP metrics generated by the browser (if the browser module is used).
We realized that this was not ideal and we have made a change recently to record HTTP metrics associated with the browser requests in new
browser_ scoped metrics. See xk6-browser#903.
So in the case of your test, considering that, as you say, you are only using the browser module, these HTTP metrics correspond to the metrics obtained from the HTTP requests that the actual browser instance performs.
Let me know if this clarifies the situation. As I mentioned, the changes applied to these metrics in order to have separate browser HTTP metrics will be included in the next release.
Thank you for the explanation, @Daniel.J ! this clarifies it!