Read elements from an array using constant_request_rate

__VU and __ITER are the best we have now, though that’s far from sufficient for complex cases like yours: https://k6.io/docs/using-k6/execution-context-variables

Alternatively, you use xk6 and run your tests only on a single local machine, then you can use something like this counter extension that works across all VUs: GitHub - mstoykov/xk6-counter

Finally, we’re working on a better alternative built into k6 that would be especially useful for arrival-rate executors, though I can’t give a firm ETA yet: Improve execution information in scripts · Issue #1320 · grafana/k6 · GitHub
And we have even more flexible

1 Like