From fcdba707f1f98468406bbd6da0defcad719f051f Mon Sep 17 00:00:00 2001 From: antyadev Date: Mon, 30 Oct 2023 10:06:43 +0200 Subject: [PATCH] extended LoadSimulation by TotalConstant and TotalInject --- src/NBomber.Contracts/Contracts.fs | 37 +++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/NBomber.Contracts/Contracts.fs b/src/NBomber.Contracts/Contracts.fs index dd49003..266f735 100644 --- a/src/NBomber.Contracts/Contracts.fs +++ b/src/NBomber.Contracts/Contracts.fs @@ -131,13 +131,15 @@ type IScenarioInitContext = /// NBomber's logger abstract Logger: ILogger -/// LoadSimulation allows configuring parallelism and workload profiles. +/// LoadSimulation allows configuring parallelism and workload profiles. +/// Link for info: https://nbomber.com/docs/nbomber/load-simulation type LoadSimulation = /// /// Adds or removes a given number of Scenario copies(instances) with a linear ramp over a given duration. /// Each Scenario copy behaves like a long-running thread that runs continually(by specified duration) and will be destroyed when the current load simulation stops. /// Use it for a smooth ramp up and ramp down. - /// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them. + /// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The number of concurrent Scenario copies that will be running in parallel. /// The duration of load simulation. @@ -147,18 +149,44 @@ type LoadSimulation = /// Keeps activated(constantly running) a fixed number of Scenario copies(instances) which executes as many iterations as possible for a specified duration. /// Each Scenario copy behaves like a long-running thread that runs continually(by specified duration) and will be destroyed when the current load simulation stops. /// Use it when you need to run and keep a constant amount of Scenario copies for a specific period. - /// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them. + /// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The number of concurrent Scenario copies that will be running in parallel. /// The duration of load simulation. | KeepConstant of copies:int * during:TimeSpan + /// + /// Keeps activated(constantly running) a fixed number of Scenario copies(instances), which executes as many iterations as possible until a specified iteration count. + /// Each Scenario copy behaves like a long-running thread that runs continually(by specified duration) and will be destroyed when the current load simulation stops. + /// Use it when you need to run and keep a constant amount of Scenario copies for a specific period. + /// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation + /// + /// The number of concurrent Scenario copies that will be running in parallel. + /// Total number of Scenario iterations to execute across all Scenario copies. + | TotalConstant of copies:int * iterations:int + + /// + /// Injects a given number of Scenario copies(instances) until a specified iteration count. + /// Each Scenario copy behaves like a short-running thread that runs only once and then is destroyed. + /// With this simulation, you control the Scenario injection rate and injection interval. + /// Use it when you want to maintain a constant rate of requests without being affected by the performance of the system you load test. + /// Usually, this simulation type is used to test HTTP API. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation + /// + /// The injection rate of Scenario copies. It configures how many concurrent copies will be injected at a time. + /// The injection interval. It configures the interval between injections. + /// Total number of Scenario iterations to execute across all Scenario copies. + | TotalInject of rate:int * interval:TimeSpan * iterations:int + /// /// Injects a given number of Scenario copies(instances) with a linear ramp over a given duration. /// Each Scenario copy behaves like a short-running thread that runs only once and then is destroyed. /// With this simulation, you control the Scenario injection rate and injection interval. /// Use it for a smooth ramp up and ramp down. /// Usually, this simulation type is used to test HTTP API. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The injection rate of Scenario copies. It configures how many concurrent copies will be injected at a time. /// The injection interval. It configures the interval between injections. @@ -171,6 +199,7 @@ type LoadSimulation = /// With this simulation, you control the Scenario injection rate and injection interval. /// Use it when you want to maintain a constant rate of requests without being affected by the performance of the system you load test. /// Usually, this simulation type is used to test HTTP API. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The injection rate of Scenario copies. It configures how many concurrent copies will be injected at a time. /// The injection interval. It configures the interval between injections. @@ -183,6 +212,7 @@ type LoadSimulation = /// With this simulation, you control the Scenario injection rate and injection interval. /// Use it when you want to maintain a random rate of requests without being affected by the performance of the system you load test. /// Usually, this simulation type is used to test HTTP API. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The min injection rate of Scenario copies. /// The max injection rate of Scenario copies. @@ -193,6 +223,7 @@ type LoadSimulation = /// /// Introduces Scenario pause simulation for a given duration. /// It's useful for cases when some Scenario start should be delayed or paused in the middle of execution. + /// Link for info: https://nbomber.com/docs/nbomber/load-simulation /// /// The duration of load simulation. | Pause of during:TimeSpan