-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to define the number of iterations for multi-threaded testing #615
Comments
Hi @avoitenko |
One more thing, context.InvocationNumber gives you a number of invocations per ScenarioCopy/instance. It's not Global InvocationNumber for the whole test. I don't remember the reason why it's not global. Maybe it does make sense to fix it and make it global :) |
@AntyaDev |
InvocationNumber should represent the number of iterations per thread but not the whole scenario. It works as expected. |
Hi @avoitenko , Yes, we can add this. Sounds reasonable. |
Great. Waiting for implementation. |
Hi @avoitenko btw: if you interested we have a roadmap and we added your requests about iterations: https://nbomber.com/docs/getting-started/roadmap |
Hi @avoitenko , Also, NBomber v5.4 added support of two new LoadSimulations: |
Hello @AntyaDev
I am trying to define a number of iterations for multi-threaded testing.
My expectation is to increase the test speed when I increase the number of threads.
Please consider the code below:
`public class IterationTest
{
//--- config
public readonly int Threads = 1; // number of threads
public readonly int Iterations = 500; // number of iterations for each thread
public readonly TimeSpan Duration = TimeSpan.FromSeconds(50); // duration
}`
When I set Threads=1, Iterations = 500, the test takes 8 seconds, request count │ all = 501, ok = 500
When I set Threads=10, Iterations = 50, the test takes 2 seconds, request count │ all = 715, ok = 500
I need your advice on how to improve its performance because we have 215 wrong iterations.
My general requirements - invoke a certain amount of Iterations for certain threads number.
Maybe you have a good solution because I trying to migrate my code from K6 to NBomber.
K6 has the native config parameter for it which is called 'iterations'.
If possible please add the parameter iterations in to WithLoadSimulations
Thanks.
The text was updated successfully, but these errors were encountered: