Open ericmacfarland opened 7 years ago
It's one of those features that looks like a bug. Custom stats are not included in the final aggregate report because there's not information to be able to compute aggregate values correctly. That definitely needs to be fixed, but the implementation was a bit of a hack in the first place.
Background
stats
anddone
events from Artillery.customStats
event in order to add custom metrics to the stats objectSituation
When the
stats
even is fired, I see the custom stats shown exactly as I would expect them to beWhen the
done
event is fired, the custom stats are overwritten with an object that's along the lines ofI believe I found the code that performs the overwrite: Once all scenarios are complete:
Stats.combine(aggregate).report()
then passes the result when it emitsdone
.report()
clears out the customStats object and overwrites it hereDoes anyone know why the custom stats are overwritten? Is this the intended behavior, or should the custom stats be preserved when they're passed to the
emit('done)
?