jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How to access the number of threads
Date Thu, 25 Nov 2004 09:01:54 GMT

I am presently working with the Jmeter src code
to build my own sampler.

I need to make use of the numebr of threads,
ramp time and loop count values.

In the src code I found the ThreadGroup class
in the package org.apache.jmeter.threads.

Here I have the functions 
and so on...

All these functions return int values.

In my program I imported the package 
create an object for class ThreadGroup.

I start jmeter from ant build and enter 
some values for threadgroup properties
and access the thread functions thro the objects
of ThreadGroup class.

But I dont get the values that i entered into jmeter

Where am I going wrong???

ThreadGroup tg1 = new ThreadGroup();

int t1 = tg1.getDefaultNumThreads();
        int t2 = tg1.getNumThreads();
        int t3 = tg1.getDefaultRampUp();
        int t4 = tg1.getRampUp();
        long t5 = tg1.getDuration();
        long t6 = tg1.getEndTime();
        long t7 = tg1.getDelay();
        String s11 = tg1.getName();
        String s22 = tg1.getThreadName();

and i get the following values o/p

null(for the string)
1000000(for the integers returned)
where 1 - DefaultNumThreads().

with regards,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message