Is there a way to use a static variable shared across VUs in K6.
Say
// init code
let x = 0 // i want this to be static
// options
export let options = {
vus : 10,
iterations : 10
};
// VU code
export default function() {
x++;
console.log(x);
}
When I run this piece of code, the output should be incremental (1 to 10) and not 1 printed 10 times (1 for each VU).