-
Notifications
You must be signed in to change notification settings - Fork 387
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 option to output the final stats in JSON to stdout #167
Conversation
What is your expected output? This is what I get with -j Eniac $ siege -j -c2 -r2 https://www.joedog.org/ { "transactions": 124, I would suggest forcing it into quiet mode like thisL Eniac $ siege -q -j -c2 -r2 https://www.joedog.org/ { "transactions": 124, |
Forcing quiet mode is a fine approach. I considered that but figured I'd make the smallest change possible to existing functionality, and all the non-JSON output (besides verbose and debug which I disabled for json_output) goes to stderr, so it looks a little goofy in your first example but doesn't interfere with piping or redirecting stdout. I just pushed a change to the PR that sets quiet mode instead. |
To test for valid JSON output I've been using jq
And to extract a specific value
|
This still prints |
I'll look at it tomorrow. In quiet, that should be silent, too. That's
probably a bug.
…On Sun, Feb 9, 2020 at 5:57 PM Ben Baker-Smith ***@***.***> wrote:
This still prints Lifting the server siege... in addition to the JSON
output. That's not a problem functionally because it goes to stderr, but do
you think it should be silenced too? And if so do you think it should be
silenced for quiet mode generally or just json_output?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#167?email_source=notifications&email_token=ABJRHZXCP2SBN5D5XUB26P3RCCC43A5CNFSM4KSCZJ7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELG2YMY#issuecomment-583904307>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJRHZRCYDAPMITD75TTHRLRCCC43ANCNFSM4KSCZJ7A>
.
|
This was merged in manually today, closing the PR. |
I would like to run Siege and interpret the results programmatically, particularly in an automated CI environment. Having the option to print the results as JSON to stdout would make Siege easier to integrate with other scripts and tools.
This PR addresses feature request #151