Locust: Failure response time not displaying in UI.

Created on 26 Nov 2014  Â·  7Comments  Â·  Source: locustio/locust

locust.events.request_failure takes response_time but does nothing with it.

In fact, the UI shows 0's even if a response time is reported with the request_failure event:

screen shot 2014-11-26 at 1 51 59 pm

invalid

Most helpful comment

Yeah, I think we should include the response time of failures as long as we get an HTTP response from the server, but not for other failures such as socket, dns, or connection errors.

To achieve this we should make it so that if response_time is provided by the failure event, it'll be included in the stats. And then in the HTTP client make sure that we only provide response_time to the failure event when we've gotten an actual HTTP response.

All 7 comments

I'm also having this issue. It makes me wonder if the failures that are also in the same line as some successful requests are being treated as if they have 0 response time. This would drastically skew data of the median, average, and min response times. Is there a fix to this?

I know this is old, but I'm also confused why stats.on_request_failure (and the stats system more generally) ignores response_time for failures. It's not obvious at all that this is the case, and even if a request fails I feel like in most cases you would still want to track the response_time in the stats. Or at least have it be configurable.

Yeah, I think we should include the response time of failures as long as we get an HTTP response from the server, but not for other failures such as socket, dns, or connection errors.

To achieve this we should make it so that if response_time is provided by the failure event, it'll be included in the stats. And then in the HTTP client make sure that we only provide response_time to the failure event when we've gotten an actual HTTP response.

@heyman Yeah I think that makes a lot of sense

Hi. Any chance that this will be resolved? I am using following code to (manually) trigger request failures

request_failure.fire(
    request_type='WebSocket Recv',
    name='app/api/async',
    response_time=666,
    exception="Something failed",
)

but it still displays 0 instead 666 as response time :(

image

Can't reproduce in current version.

Maybe this was fixed a long time ago...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

foxracle picture foxracle  Â·  3Comments

dolohow picture dolohow  Â·  3Comments

radiantone picture radiantone  Â·  3Comments

gboorse picture gboorse  Â·  3Comments

ashleigh-robinson picture ashleigh-robinson  Â·  3Comments