Are you sure you want to do that? It sounds very complicated, which is
usually an indicator that you should try to simplify your test.

I'm not sure this is even possible with a stock jmeter install, The thread
synchronization timer provides for some basic thread blocking, but it may
not be flexible enough for what you're trying to do.

Before I learned about the synchronization timer, I wrote a plugin that
might be flexible enough to handle this. The source and jar file are at
https://github.com/FlyingRhenquest/JmeterThreadSync. With my addon, you'd
create two config elements, one for the thread groups that run on even
times, and one for the thread groups that need to run every third time.
Ignoring the fact that TG5 needs to run in either case for the moment, you'd
set the even config element to the number "3" (There will be 3 threads
running when they need to run) and put checkpoints at the beginning of the
two threads that will be waiting. For the third-time threads, you'd set the
config element number to "4" and put checkpoints at the beginning of the
three threads that will be waiting.

Then in your main thread you'd just maintain a counter, test the counter,
and use a checkpoint to release the appropriate threads depending on whether
it's even or every third time.

TG5 is a bit of a problem since it needs to run for both, but you could
maintain a flag in the thread group that would oscillate between two values.
It would start at 1 and when it's 1 it could set itself to 2 and then block
on the even checkpoint. When it's 2 it would set itself to 1 and block on
the odd checkpoint.

If you get it working correctly it would probably be a beautiful machine,
like a car engine, with lots of moving parts, that is impossible to explain
the workings of to anyone who doesn't understand why a car engine is
beautiful.

-- 
Bruce Ide
flyingrhenqu...@gmail.com

Reply via email to