Skip to content
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

Add response_length to request_failure event #1144

Merged
merged 3 commits into from
Nov 13, 2019
Merged

Add response_length to request_failure event #1144

merged 3 commits into from
Nov 13, 2019

Conversation

cyberw
Copy link
Collaborator

@cyberw cyberw commented Nov 13, 2019

Like with request_success... This breaks compatibility with existing tests that use event handlers with positional arguments. Maybe it is worth a bumped minor version, to indicate that to users.

@codecov
Copy link

codecov bot commented Nov 13, 2019

Codecov Report

Merging #1144 into master will increase coverage by 0.5%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1144     +/-   ##
=========================================
+ Coverage   75.12%   75.62%   +0.5%     
=========================================
  Files          18       20      +2     
  Lines        1833     1879     +46     
  Branches      280      290     +10     
=========================================
+ Hits         1377     1421     +44     
- Misses        390      391      +1     
- Partials       66       67      +1
Impacted Files Coverage Δ
locust/contrib/fasthttp.py 89.01% <ø> (-1.16%) ⬇️
locust/clients.py 91.48% <ø> (ø) ⬆️
locust/stats.py 82.33% <100%> (ø) ⬆️
locust/core.py 84.81% <0%> (-0.41%) ⬇️
locust/exception.py 100% <0%> (ø) ⬆️
locust/main.py 35.24% <0%> (ø) ⬆️
locust/wait_time.py 100% <0%> (ø)
locust/util/deprecation.py 85% <0%> (ø)
locust/runners.py 65.1% <0%> (+1.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c16dc71...7d5eeeb. Read the comment docs.

@heyman
Copy link
Member

heyman commented Nov 13, 2019

Nice! The response_length should also be passed along to the log_error() call in on_request_failure on this line:

global_stats.log_error(request_type, name, exception)

Maybe it is worth a bumped minor version, to indicate that to users.

Yeah, I think that the next version we release should be 0.13 (the new wait time API have now also been merged).

@heyman
Copy link
Member

heyman commented Nov 13, 2019

Hmm, we might also need something like #1088, but for response_length

@cyberw
Copy link
Collaborator Author

cyberw commented Nov 13, 2019

Hmm, we might also need something like #1088, but for response_length

Responses that have an undefined response_length? Maybe... but I think we're ok with counting them as zero for now. Or do you feel this relates to the PR? As we dont calculate average response length, it doesnt really hurt that undefined response length cannot be separated from zero response times.

@heyman
Copy link
Member

heyman commented Nov 13, 2019

As we dont calculate average response length

We do calculate the average response length:

image

We've been using 0 for failures up until now (since it wasn't available in the event params), so it wouldn't make it more wrong to keep doing it, though maybe it would be worth fixing it now when it is available?

@cyberw
Copy link
Collaborator Author

cyberw commented Nov 13, 2019

Oh, I didnt see it in the StatsEntry object, so I thought it wasnt used. Maybe I should start using the web UI more :)

But it looks like it is already fixed by my changes?

image

@heyman
Copy link
Member

heyman commented Nov 13, 2019

But it looks like it is already fixed by my changes?

Ah, nice!

Then I guess we can merge this, and perhaps create a separate issue for excluding failures with None as response_length, from the average response size.

@cyberw cyberw merged commit cfad799 into locustio:master Nov 13, 2019
@cyberw cyberw deleted the add-response_length-to-request_failure branch January 28, 2020 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants