Why init called 4 times?

The first time the init context is executed is to get the exported script options. No other function is executed at the time, only the global init code. Then, the init context is executed once for every VU that needs to be initialized, as well as once for setup() and teardown(), since they are executed in their own separate transient VUs. So, in total, the global init context code will be executed MaxVUs+3 times.

3 Likes