[k6] Exclude timings when error occur 76/138776/4
authordanielhanrahan <daniel.hanrahan@est.tech>
Fri, 16 Aug 2024 12:56:14 +0000 (13:56 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Tue, 27 Aug 2024 16:50:17 +0000 (17:50 +0100)
commit78894db49673ee86f536634f80fa5d82db245a4b
tree0a14b203d7652050375b73e54adbbfe3079d7e7d
parent607a8563a6e9b935c6feb2604ae0752a07a91895
[k6] Exclude timings when error occur

If an error occurs during k6 test, e.g. tcp connection refused, the
timing of failed response is included in the average response time.
This can lead to incorrect plots when errors occur, e.g. operations
appear to be faster when really the operations are failing.

- use custom Trend metrics for all measurements
- only log results when operations return expected response codes

Issue-ID: CPS-2345
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Iab1db5e5ca9530f33da239187348cabcd0605648
k6-tests/ncmp/common/utils.js
k6-tests/ncmp/ncmp-kpi.js