You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm initializing dozens (if not hundreds) of custom metrics (which have to be initialized in init context). Because there are so many custom metrics, I'm trying using this kind of code with nested for-loops (called in init context):
However, the for-loop seems to be the only thing in this code not working in the init context.
The reason for so many custom metrics is stress testing of API, which takes some time to build up. So, during building up tests are run in different phases, and for each phase there are dozen or so tests with different parameters. From all the metrics we finally build up a 2D result report table, each cell showing median response time.
The text was updated successfully, but these errors were encountered:
for loops should work in the init context. I think the problem in your case is that you don't increment links in the inner loop, rather you increase kilosOfNodes, leading to an infinite loop... copy-paste issues... 😄
Right. There was also another problem: MaxKilosOfNodes was defined after calling initAllMetrics. Now it works, but debugging this was difficult because console.log doesn't seem to work in init context.
Yeah, I've also been bitten by the lack of logging in the init context, debugging stuff by throwing exceptions is not fun at all... Created a new issue about that, since it's going to be somewhat complicated to implement properly, mostly due to the k6 architecture: #951
I'm initializing dozens (if not hundreds) of custom metrics (which have to be initialized in init context). Because there are so many custom metrics, I'm trying using this kind of code with nested for-loops (called in init context):
However, the for-loop seems to be the only thing in this code not working in the init context.
The reason for so many custom metrics is stress testing of API, which takes some time to build up. So, during building up tests are run in different phases, and for each phase there are dozen or so tests with different parameters. From all the metrics we finally build up a 2D result report table, each cell showing median response time.
The text was updated successfully, but these errors were encountered: