Skip to content

Commit

Permalink
Update release notes/v0.31.0.md
Browse files Browse the repository at this point in the history
Co-authored-by: na-- <[email protected]>
  • Loading branch information
Ivan Mirić and na-- authored Mar 11, 2021
1 parent 9a392b7 commit d08f642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release notes/v0.31.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Note the new `http_req_duration` sub-metric for expected responses only, and the
- `'http_req_failed': ['rate<0.1']`, i.e. fail the test if more than 10% of requests fail.
- `'http_req_duration{expected_response:true}': ['p(95)<300', 'p(99.9)<500']` - fail the test if the the 95th percentile HTTP request duration is above 300ms or the 99.9th percentile is above 500ms; specifying `expected_response:true` here may be important, because a lot of times failed requests may return more quickly than normal ones, thus skewing the results and wrongly satisfying the threshold.

If the response callback is not specified, the default expected statuses will be `{min: 200, max: 399}`. The previous behavior of not emitting anything can be achieved by setting the callback to `null`, i.e. `http.setResponseCallback(null)`. Additionally the `expected_response` tag can be disabled by removing it from the default list of system tags, e.g. `k6 run --system-tags 'proto,subproto,status,method,url,name,group,check,error,error_code,tls_version,scenario,service'`.
If the response callback is not specified, the default expected statuses will be `{min: 200, max: 399}`. The previous behavior of not emitting anything can be achieved by setting the callback to `null`, i.e. `http.setResponseCallback(null)`. Additionally, the `expected_response` tag can be disabled by removing it from the default list of [system tags](https://k6.io/docs/using-k6/options#system-tags), e.g. `k6 run --system-tags 'proto,subproto,status,method,url,name,group,check,error,error_code,tls_version,scenario,service'`.

The `http.setResponseCallback()` is planned to allow arbitrary JS functions to process responses in the future, but for now only the `http.expectedStatuses()` callback is supported.

Expand Down

0 comments on commit d08f642

Please sign in to comment.