On 27/11/2008, Luis Joaquim <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a problem I would apreciate your help. I need to obtain the value of > the time it took for a http request and store it in a variable so after I > can call a http request with this variable. > > I am not able to store this value. Only using a listener, but can only > access after the script is run.
One way to do this would be to use a BeanShell or BSF Post-Processor. http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_PostProcessor http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BSF_PostProcessor The elapsed time is held in the SampleResult: http://jakarta.apache.org/jmeter/api/org/apache/jmeter/samplers/SampleResult.html http://jakarta.apache.org/jmeter/api/org/apache/jmeter/samplers/SampleResult.html#getTime() This is passed to the processors as the variable "prev" so the time is obtained as: prev.getTime() You can set this in a variable using vars.put("varname",value) > Thanks in advance, > > Luis Joaquim > > Critical Software SA > Parque Industrial de Taveiro, Lote 48 > 3045-504 Coimbra, Portugal > Tel:+351.239989100 Fax:+351.239989119 Mobile:+351.932574033 > http://www.criticalsoftware.com mailto:[EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

