k6 icon indicating copy to clipboard operation
k6 copied to clipboard

`arrival-rate` executors do not report active VUs accurately, they report initialized VUs instead

Open Dieviete opened this issue 4 years ago • 4 comments
trafficstars

In the console output of K6 you can easily see how many VUs are currently active. See picture k6 console output

image

In the .json output there is a metric "vus" and a metric "vus_max". I would expect "vus" to reflect the number of currently active virtual users. However, in my .json output, except for the entries where "vus" is 0, "vus" and "vus_max" always have the same value. See picture k6 .json output

image

Is this a bug? If not, how to generate the correct number of active VUs in the .json output?

Dieviete avatar Apr 19 '21 12:04 Dieviete

Thanks for reporting this! We've known about for a while, but we lost sight of it... :disappointed: It is something halfway between a bug and a missing feature, one of the compromises for the sake of expedience to finally get #1007 out of the door last year... :sweat_smile: Its time to get fixed might have finally come, however, so I'll edit this issue a bit and keep it open. We probably should take care of it together with the rest of the items in https://github.com/k6io/k6/issues/1386 and https://github.com/k6io/k6/issues/1944

To give some details about the issue: currently, arrival-rate executors can easily show in the progress bars precisely how many active VUs they are using. However, since multiple scenarios can be executed simultaneously, and the vus metric is reported by k6 every second and encompasses all scenarios (though that might also change, see https://github.com/k6io/k6/issues/1833), arrival-rate executors report as active all initialized VUs, even when that might not be the case.

na-- avatar Apr 19 '21 13:04 na--

Thank you for the quick response ☺️

Dieviete avatar Apr 19 '21 14:04 Dieviete

Hello! How about status of this issue? I can't get current actual VU's in metrics (from influxDB) in Grafana like values progress bar show, only values after slash. But i think it's good to write value before slash also.

jsolv avatar Apr 18 '22 09:04 jsolv

Sorry @jsolv, nobody has worked on this yet. I added it to the next milestone, but I can't make any promises when we'll get to it... :disappointed: If someone wants to make a PR before we can, we can review it though!

na-- avatar Apr 18 '22 10:04 na--