Change http_req_failed line in output summary
nicolevanderhoeven opened this issue · 1 comments
The check and cross on the http_req_failed
line is the opposite of what I expected. The number after the check actually refers to responses where http_req_failed
is true, whereas I expected ✓ to mean "HTTP code as expected" and ✗ to mean "HTTP code not as expected".
I think this is confusing and suggest either flipping that behavior or clarifying with "y failed z expected".
I would be confusing if we just flip the ✓ and ✗ meanings, but maybe we can have some text like this: 25.00% (523 out of 2092 requests failed)
I'd prefer we do this by adding a callback per key option for generateTextSummary()
: https://github.com/k6io/jslib.k6.io/blob/b2f64e18d6ffb636e34b6dbc2702b5c050243518/lib/k6-summary/0.0.1/index.js#L374-L375
And having a default hook for http_req_failed
that would print our custom Rate text. That way users can re-use it for printing their own metrics in a custom manner, or for removing certain metrics out of the summary altogether, while still having the the jslib code handle the majority of the work