FYI, it looks like this can be done with the following code within a sampler:
Controller ctrl = getThreadContext().getThreadGroup().getSamplerController(); LoopController loopCtrl = (LoopController)ctrl; int loopCount = loopCtrl.getLoops(); The getSamplerController() method returns a reference to the Controller interface, which doesn't know anything about loops. However, it appears that the thread group works with a LoopController by default so the downcast works. I'm not sure what, if anything, can be done to invalidate that assumption. If you select "forever" or use the scheduler feature on the thread group, loop count will be -1. On Tue, Jul 19, 2011 at 9:42 AM, E S <electric.or.sh...@gmail.com> wrote: > I have a custom sampler that I'm writing. Is it possible to > programmatically access the thread group's loop count from within the > sampler? I can do the following: > > this.getThreadContext().getThreadGroup() > > From that I can get the thread group name, comments, and number of threads > but I don't see a property for the loop count. >