How do I display the count of iterations over a given interval in Grafana?

I’d like to be able to list the total number of iterations run over the specified interval in Grafana.

My current select statement is: SELECT sum("value") FROM "iterations" WHERE $timeFilter GROUP BY time($__interval) fill(none)

However, that gives a float that fluctuates every few seconds, instead of an integer that is static unless I change the time series. What do I need to change to get this?


I’m not familiar with the InfluxDB query language at all, the query seems fine to me, but given that k6 iteration lengths are not fixed (they can vary based on HTTP request duration times and random sleep() times, etc.), I don’t think you should expect a static value. That said, this question is probably better suited for some InfluxDB forum, where there are experts on the topic. Sorry for the delay in answering, and for my probably not very helpful answer…

Hey, that’s just fine. I really just need a number so I can go back and revert any load testing artifacts. For now, just referencing iterations after a test run should be enough. I was just hoping there was an easy solution I was missing.