gwen-interpreter / gwen

Core Gwen interpreter
https://gweninterpreter.org
Apache License 2.0
36 stars 8 forks source link

Add ramp up interval for staggered parallel execution #19

Closed bjuric closed 8 years ago

bjuric commented 8 years ago

This feature is to support user request issue #18

It adds the ability for users to configure a ramp up interval (in seconds) used for staggering parallel executions. The interval can be configured through a new gwen.rampup.interval.seconds setting/property. This setting is only applicable for parallel execution mode. If it is not set or is set to zero, then no staggering will occur (as per the previously default behaviour).

For example, if you set this interval to 5 seconds, the first parallel partition will execute immediately, the second one will execute after 5 seconds, the third one after 10 seconds, and so on.

# gwen.properties or -D command line option gwen.rampup.interval.seconds=5

When you launch Gwen in parallel execution mode with this setting on a quad core machine, the following output will be written to the console log informing you of the allocated ramp up periods (the order in which these are logged is non determinant):

INFO - Ramp up period for parallel partition 4 is 15 seconds
INFO - Ramp up period for parallel partition 1 is 0 seconds
INFO - Ramp up period for parallel partition 2 is 5 seconds
INFO - Ramp up period for parallel partition 3 is 10 seconds

The staggering will then look like this:

|< 0 secs >|<-- feature 1a -->|<-- feature 1b -->|..
|<----- 5 secs >|<-- feature 2a -->|<-- feature 2b -->|..
|<---------- 10 secs >|<-- feature 3a -->|<-- feature 3b -->|..
|<--------------- 15 secs >|<-- feature 4a -->|<-- feature 4b -->|..
bradywood commented 8 years ago

:+1: