Hi folks. I’ve been contemplating how to include std deviation into the results of the client metrics output by k6. I don’t see a direct way to do so from the following method with a custom k6 metric. Nor does it seem like a good idea to do this calculation (below) in memory.

- Calculate the Mean (the simple average of the numbers)
- Subtract the Mean from each number and square the result
- Add up all the values then divide by N-1
- Take the square root of that. It’s your Standard Deviation

so to my question. Has anyone found a good way to calculate std deviation of client metrics after the k6 metrics have been exported to some time series db (prometheus, influxdb etc…), in a way that the value could be correlated to Latency per group or tag? But first of course I’d need to get the std dev. Even combined across all metrics in the scenario regardless of group or tag would be nice to begin with.

Any ideas someone can share?

Thanks