Skip to content
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

Simulation.Inject to have control over initial delay of scenario instances #748

Open
michaelplavnik opened this issue Oct 14, 2024 · 1 comment

Comments

@michaelplavnik
Copy link

This issue is a follow up on #747.

In its current form one can construct simulation as Simulation.Inject(1_000, TimeSpan.FromSeconds(10), TimeSpan.FromMinutes(30)).
This simulation will inject 1000 scenario instances every 10 seconds and each scenario instance will have random delay between zero to 10 seconds.

Proposed change introduces floating parameter with range [0..1] and default equal to 1.0 that will control how much of the injection interval is used for delay. Thus, when value of the parameter is 1, behavior is identical to current, when value is zero, there is no initial delay at all, and if value is 0.5 then initial delay is random between 0 and 5 seconds (in the example above).

@AntyaDev
Copy link
Contributor

Hi @michaelplavnik
Can you please try NBomber v5.8.0?
"In this version, we reduced randomness to a maximum of 1 second. So even if you specify injectInterval = 10 sec, we’ll apply randomness within a [0..1] second range. For your case with Simulation.Inject(1_000, TimeSpan.FromSeconds(10)), it should work well."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants