UNPKG
k6-test-framework
Version:
latest (1.0.0)
1.0.0
Enterprise-grade load testing solution with k6
k6-test-framework
/
report
/
customMetrics.js
11 lines
(10 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// report/customMetrics.js
export
const
CustomMetrics
= {
trackErrors
:
(
errors
) =>
({
totalErrors
: errors.
length
,
errorTypes
: errors.
reduce
(
(
acc, err
) =>
{ acc[err.
type
] = (acc[err.
type
] ||
0
) +
1
;
return
acc; }, {}), }), };