-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP metric including connection time #2692
Comments
There are a few problems with this, on both the technical and UX sides. But first, if anyone stumbles on this issue, there is an easy workaround you can do without waiting for us to add this to k6. Just create a simple To get to the UX issues first. In most cases it's probably a bad idea to add together the time it took the client to establish the connection (DNS resolution + network connection + TLS handshaking) with the time it actually took to send the HTTP request and receive the response back (which in k6 is measured by
All of these (and probably other) considerations might cause k6 to legitimately measure valid values for So, these were the UX/documentation issues - any such |
After an internal conversation, the team decided we wouldn't introduce a new metric at that stage. We might explore this in the future, but for now, I'm closing the task as not planned. |
Feature Description
When using the HTTP API, k6 generates six metrics measuring the different stages of the HTTP request. From HTTP built-in metrics docs:
Also, it creates the
http_req_duration
metric that measures ONLY the time the SUT spent processing and responding to the request: the sum ofhttp_req_sending
+http_req_waiting
+http_req_receiving
(excluding the time spent during the connection).This blog describes how other tools, such as JMeter and Gatling, measure response time. These tools measure the response time differently, including some of the stages establishing the connection.
This confusion about how we measure latency is frequent. To align with other tools and/or mitigate this confusion, we could explore creating a new HTTP metric that includes the sum of all the stages of the HTTP request -
http_req_total_duration
?Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: