-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Added a stats-success-breakdown flag for more detailed status code specific response statistics #296
Conversation
Thanks! It looks I think it's better to print response times for all of
Yes, it's verbose but |
For testing, there are no tests for outputs. |
Thanks @hatoo , so just to clarify you are suggesting that when the flag is set the summary would include 3 sections for both the
In addition the JSON would also need to include the 3 sections. I think we would probably then want to change the flag name, e.g. something like |
@wjhoward
Yeah, the flag name should be changed and |
@hatoo Regarding the broken EDIT: Actually I can just fix that in this PR - may be easier 😄 |
@wjhoward |
With the recent changes the summary output looks like this: The JSON output also includes the new fields only if the flag is set: Successful status codes include 2xx only. Need to test this more. Does this match your thinking @hatoo ? |
LGTM 👍 . |
@hatoo I've tested this and it works as I would expect. Ideally it would be nice to include output tests in the test suite for validating this, but understand that it's non trivial. |
Thank you! |
Edit: This comment is now out of date, see additional comments below
Added a command line flag
success-stats-only
which when set includes only successful (2xx responses) when measuring the Response time histogram and distribution statistics (as per issue: #212 )The below example was generated using a backend server which returns slow 5xx responses. The left terminal is running with the default options, and the right terminal has the new flag set. As you can see, the slow 5xx responses are excluded from the right terminal:
The same flag is applied to the JSON equivalent fields.
I did investigate adding a test for this:
warp
handler to return non 2xx responses for every other requestAlthough I stopped as it was a little tricky, and I wanted to see what the initial response to the PR was first.
Can proceed with adding the test if the changes here make sense.