jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BOLB (Bohdan L Bodnar)" <B...@panduit.com>
Subject RE: measuring time in "while" loop
Date Tue, 11 Dec 2012 15:36:39 GMT
Thank you, Sebb!

One more question:  I want to store these times with timestamp (e.g., via the simple data
writer).  I don't see a way of doing this (this could be lack of my knowledge of jmeter's
features).  For example, if the loop spins X times, I want to store the starting time of the
loop, the total time spent in the loop, and a predetermined label name for this loop.  Any
advice on how to do this is greatly appreciated.

Thank you, again,

Bo


-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Friday, December 07, 2012 7:24 PM
To: JMeter Users List
Subject: Re: measuring time in "while" loop

On 7 December 2012 20:58, BOLB (Bohdan L Bodnar) <BOLB@panduit.com> wrote:
>
> Greetings!
>
>
>
> Here is the problem:
>
>
>
> I've HTTP-based API calls to a particular system.  The system returns an error code that
is either negative (for success) or greater than zero (indicating the requested operation
has been started).
>
> In the event the return code is greater than zero, I poll the system using a "while"
loop.  In one of the calls, I'm using the following in the "while" controller:  ${__javaScript(${DEL_CAT1_STATUS}
> 0)}.  The portion of the script looks as follows:
>
>

START = ${__time}

> WHILE CONTROLLER
>
>                 HTTP REQUEST (this is the API call)
>
>                                 REGULAR EXPRESSION EXTRACTOR (to get "DEL_CAT1_STATUS")
>
>                 DELAY
>
>

ELAPSED = ${__longSum($__time,-${START})}

> I want to measure the total time spent in this "while" loop (this is for statistical
analysis).  High accuracy isn't all that important - the loop will spin at least a dozen or
so times and the delay probably swamp measurement error.
>
>
>
> Any suggestions?

See above.

You could then log it using the log function or use it in a Java Sampler.

Or of course you could enclose the entire loop in a Transaction Controller.

---------------------------------------------------------------------
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


Mime
View raw message