Repository navigation
feat: Add -e/--extended-errors flag for detailed HTTP status code breakdown - #263
salmaaliia wants to merge 3 commits into
Conversation
…akdown * Track all 4xx and 5xx HTTP response status codes per worker using a lightweight, lock-free error map. * Aggregate and display a sorted breakdown of each error code in both standard summary and JSON output modes.
|
Got it, I'll take a look soon. Thanks. |
|
Thanks! |
|
Could you post some expected outouts with -e enabled? I'd like to see expected behavior. |
|
Sure! Here is what the output looks like with Standard output ( Transactions: 94 hits
Availability: 94.00 %
Elapsed time: 0.02 secs
Data transferred: 0.00 MB
Response time: 0.96 ms
Transaction rate: 4700.00 trans/sec
Throughput: 0.12 MB/sec
Concurrency: 4.50
Successful transactions: 72
Failed transactions: 6
HTTP-404: 8
HTTP-429: 14
HTTP-500: 5
HTTP-503: 1
Longest transaction: 10.00 ms
Shortest transaction: 0.00 msJSON output ( {
"transactions": 98,
"availability": 98.00,
"elapsed_time": 0.02,
"data_transferred": 0.00,
"response_time": 0.00,
"transaction_rate": 4900.00,
"throughput": 0.12,
"concurrency": 3.50,
"successful_transactions": 85,
"failed_transactions": 2,
"longest_transaction": 0.01,
"shortest_transaction": 0.00,
"extended_errors": {
"HTTP-404": 11,
"HTTP-429": 2,
"HTTP-500": 2
}
} |
|
Thanks, I'll set up a page that returns random error codes. It doesn't appear that you're accumulating 3xx returns. |
|
Yes, it only counts 4xx and 5xx since 3xx are redirects rather than errors. Do you think 3xx should be included too? |
|
I'm not sure about 3xx. We already collect pass/fail information in the general summary. This could be a breakdown of all HTTP codes, in which case 3xx should be included. For that matter, 2xx should be included as weel. On the other hand, if all we care about are HTTP codes for errors, then 4xx, 5xx meet that requirement. What are your thoughts? |
|
I think we can have |
|
I like it. Do you want to update it, or should I? -ee is a little tricky; it's the short option with e as an argument. Maybe do it without the short options --extended These are examples with no short option |
|
I will update it, thank you! |
…akdown * Track all HTTP response codes with --extended and errors only with --extended-errors. * Display sorted breakdown at the end of summary output and structured in JSON mode.
|
Just pushed the update with here is how the output looks like for Successful transactions: 73
Failed transactions: 7
Longest transaction: 10.00 ms
Shortest transaction: 0.00 ms
HTTP response codes:
HTTP-200: 73
HTTP-404: 9
HTTP-429: 11
HTTP-500: 3
HTTP-503: 4 |
This PR adds a new
-e, --extended-errorsflag to provide visibility into specific HTTP error status codes: