Search code examples
javascriptload-testingk6

Why does the built-in metric "vus" in .json output not reflect the console output?


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

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

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


Solution

  • According to the k6 gitHub this is "something halfway between a bug and a missing feature". This is the issue: https://github.com/k6io/k6/issues/1977