Open savvagen opened 2 years ago
hi @savvagen 👋
Artillery v2 removed customStats
. All metrics (from Artillery itself and any custom metrics) are stored under counters
/summaries
/rates
field of the stats object now.
So for example, this metric emitted by the metrics-by-endpoint plugin and is a counter
:
plugins.metrics-by-endpoint./comments/3 (GET/posts/ID).codes.200
and will be available under statsObject.counters['plugins.metrics-by-endpoint./comments/3 (GET/posts/ID).codes.200']
hope that makes sense. lmk if that does not work or if you have any other questions!
@hassy Hi. Solution like:
console.log(JSON.stringify(statsObject.counters['plugins.metrics-by-endpoint./posts (GET/posts).codes.200']))
Is not working:
TypeError: Cannot read properties of undefined (reading 'plugins.metrics-by-endpoint./posts (GET/posts).codes.200')
Cause as I mentioned:
"customStats": {
},
"counters": {
},
these fields are returned as empty from the report() function
I am using:
metrics-by-endpoint plugin is added to the config section.
I am receiving an output with all detailed metrcis:
When I am trying to print the stats from the plugin events
customStats
is empty, but I am expecting to get the detailed metrics like in artillery - v1.7.9Plugin
index.js
Finally I am receiving