You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by danimni <da...@gmail.com> on 2011/03/22 18:18:12 UTC

Aggregate sum for all threads

Hi All,
I have a small problem with aggregate count for all my threads.
My test plan is built with 5 threads and 10 total users (each thread will
execute 2 users).
I need to sum the total number of submissions of each user. For that, I've
defined new UDV named 'TotalSubmissions'. My problem is that the
'TotalSubmissions' is created for each thread. 
So, at the end of the test I have 5 'TotalSubmissions' (that contains the
sum of submission of 2 users).
I would like to sum ALL submission for ALL the threads.

How can I do that?
Is there a way to define 1 global parameter that will be for all my threads?

Thanks in advanced... :)

Dan.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4257247.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Aggregate sum for all threads

Posted by danimni <da...@gmail.com>.
Hi Deepak,
Can you please elaborate on this?
I've defined property using 'Java Request' element and in the 'Label' field,
I set ${__setProperty(TotalSubmittedTasks,0)}.
Each time I change its value, it doesn't sync to the other threads.

Dan.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4258490.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Aggregate sum for all threads

Posted by Deepak Shetty <sh...@gmail.com>.
use a property (other shared objects across threads are any static fields
that you can access via java or objects in BSH shared object).
remember to synchronize access (or use atomicinteger).

regards
deepak

On Tue, Mar 22, 2011 at 10:18 AM, danimni <da...@gmail.com> wrote:

> Hi All,
> I have a small problem with aggregate count for all my threads.
> My test plan is built with 5 threads and 10 total users (each thread will
> execute 2 users).
> I need to sum the total number of submissions of each user. For that, I've
> defined new UDV named 'TotalSubmissions'. My problem is that the
> 'TotalSubmissions' is created for each thread.
> So, at the end of the test I have 5 'TotalSubmissions' (that contains the
> sum of submission of 2 users).
> I would like to sum ALL submission for ALL the threads.
>
> How can I do that?
> Is there a way to define 1 global parameter that will be for all my
> threads?
>
> Thanks in advanced... :)
>
> Dan.
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4257247.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Aggregate sum for all threads

Posted by danimni <da...@gmail.com>.
my variable is general number I extract. Consider it as general number, not
submissions.
I would like to sum up the total of all extractions.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4258888.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Aggregate sum for all threads

Posted by sebb <se...@gmail.com>.
On 23 March 2011 12:58, danimni <da...@gmail.com> wrote:
> Hey Andrey,
> My 'TotalSubmissions' variable is not the sample submission the JMeter
> counts. It is a number I extract using REGEX.
> That's why 'Aggregate Report listener' won't help me here...

I would probably just save the value to the JTL file, and post-process
that later.

http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables

> thanks!
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4258737.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Aggregate sum for all threads

Posted by danimni <da...@gmail.com>.
Hey Andrey,
My 'TotalSubmissions' variable is not the sample submission the JMeter
counts. It is a number I extract using REGEX.
That's why 'Aggregate Report listener' won't help me here...

thanks!

--
View this message in context: http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247p4258737.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Aggregate sum for all threads

Posted by Andrey Pohilko <ap...@apc.kg>.
Why don't you just use Aggregate Report listener attached to target sampler? 
It will count number of samples for you and that's all...

Bye,
Andrey

В сообщении от 22 марта 2011 20:18:12 автор danimni написал:
> Hi All,
> I have a small problem with aggregate count for all my threads.
> My test plan is built with 5 threads and 10 total users (each thread will
> execute 2 users).
> I need to sum the total number of submissions of each user. For that, I've
> defined new UDV named 'TotalSubmissions'. My problem is that the
> 'TotalSubmissions' is created for each thread.
> So, at the end of the test I have 5 'TotalSubmissions' (that contains the
> sum of submission of 2 users).
> I would like to sum ALL submission for ALL the threads.
> 
> How can I do that?
> Is there a way to define 1 global parameter that will be for all my
> threads?
> 
> Thanks in advanced... :)
> 
> Dan.
> 
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Aggregate-sum-for-all-threads-tp4257247
> p4257247.html Sent from the JMeter - User mailing list archive at
> Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org