> Philip mentioned a way to rampup Threads.
> Is there a way anyone knows how to rampup threads in step sizes, i.e. say 10 threads run for 10mins, add 10 more threads after 10mins, 10 more after another 10mins so on to X threads in X duration.
> Currently to achieve this I am having to use an external wrapper like ANT script which increments threads that grinder uses, however it means I have to stop Grinder after each step size.
You can use the same approach, just have groups of 10 threads start at once:
from net.grinder.script.Grinder import grinder
from net.grinder.common import Logger
"""Log to the console, the message will include the thread ID"""
def initialSleep( self):
sleepTime = (grinder.threadNumber % 10) * 5000 # Each group of threads starts 5 seconds apart
log("initial sleep complete, slept for around %d ms" % sleepTime)
def __call__( self ):
if grinder.runNumber == 0: self.initialSleep()