jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John_schulz <john_sch...@aol.com>
Subject Re: Thread group Loop count: How can I tell in which round am I?
Date Thu, 30 Jan 2014 14:46:13 GMT
How about a function call along the same lines as threadNum. LoopCount maybe? That way there
is no need to set a variable on each iteration of the thread loop. 

Sent from my iPad

> On Jan 30, 2014, at 7:30 AM, sebb <sebbaz@gmail.com> wrote:
> 
> Not sure how easy it will be but it would be useful sometimes.
> However, it will add extra processing to every test unless some way
> can be found to make it optional
> 
> If the variable is named after the loop controller then it would be up
> to the user to ensure that names are unique.
> 
>> On 30 January 2014 12:21, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
>> Hello,
>> 
>> What about adding a new feature to expose a variable containing this loop
>> number ?
>> 
>> The issue would be to ensure in nested loop name uniticity.
>> 
>> Regards
>> 
>> 
>> 
>>> On Thu, Jan 30, 2014 at 12:27 PM, sebb <sebbaz@gmail.com> wrote:
>>> 
>>>> On 30 January 2014 08:57, Adrian Speteanu <asp.adieu@gmail.com> wrote:
>>>> Not just like that, there is a method exposed:
>>> http://people.apache.org/~mkostrze/jmeter-docs/docs/api/org/apache/jmeter/functions/ThreadNumber.html
>>>> 
>>>> In the script, use this function (try the function helper for details):
>>> 
>>> Or see http://jmeter.apache.org/usermanual/functions.html#__threadNum
>>> 
>>>> ${__threadNum}
>>> 
>>> That is the thread number, which does not vary.
>>> It is not the loop count within a thread.
>>> 
>>> I think the only method to get the loop cound is to add a counter as
>>> already suggested.
>> 
>>>> The thread number is also exposed in test output (the jtl), several
>>>> listeners (View Results Table - don't use during high load because of its
>>>> high memory consumption). The information is displayed as (example:)
>>> tn="Thread
>>>> Group 1-1" (first digit group represents the thread group number, second
>>>> digit group represents the thread number inside that particular thread
>>>> group).
>>>> 
>>>> --Adrian S
>>>> 
>>>> 
>>>>> On Wed, Jan 29, 2014 at 10:40 AM, ZK <stevesenior69@gmail.com>
wrote:
>>>>> 
>>>>> Hi,
>>>>> just add a  counter
>>>>> <http://jmeter.apache.org/usermanual/component_reference.html#Counter>
>>> to
>>>>> your thread group and reference the variable of that counter to find
the
>>>>> loop count
>>>>> 
>>>>> 
>>>>> ZK
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>> http://jmeter.512774.n5.nabble.com/Thread-group-Loop-count-How-can-I-tell-in-which-round-am-I-tp5719210p5719218.html
>>>>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
>> 
>> --
>> Cordialement.
>> Philippe Mouawad.

Mime
View raw message