artilleryio / artillery-core

artillery-core - deprecated
Mozilla Public License 2.0
29 stars 104 forks source link

Question/bug?: customStats being overwritten #186

Open ericmacfarland opened 7 years ago

ericmacfarland commented 7 years ago

Background

Situation

When the stats even is fired, I see the custom stats shown exactly as I would expect them to be

When the done event is fired, the custom stats are overwritten with an object that's along the lines of

{
    min: Number,
    max: Number,
    median: Number,
    p95: Number,
    p99: Number
}

I believe I found the code that performs the overwrite: Once all scenarios are complete:

  1. The runner calls Stats.combine(aggregate).report() then passes the result when it emits done
  2. .report() clears out the customStats object and overwrites it here

Does 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)?

hassy commented 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.