jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shmuel Krakower <shmul...@gmail.com>
Subject Re: Setting elapsed and latency times
Date Fri, 01 Feb 2013 08:06:55 GMT
Hi,
Why not using JMeterPlugins PerfMon:
http://code.google.com/p/jmeter-plugins/wiki/PerfMonMetrics#JMX_Metrics
?


Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Thu, Jan 31, 2013 at 8:47 PM, sebb <sebbaz@gmail.com> wrote:

> On 31 January 2013 17:30, Marcelo Jara <marcelojara@hotmail.com> wrote:
> > I am trying something out. Let me know if it makes sense.
> > I wrote a groovy script that will get certain values from a server via
> JMX. For example, I am getting heap used, thread count, class count, and
> CPU. I am currently writing this data to a file and can process it at the
> end of the test.
> > However, I was thinking it may be worthwhile trying to create a sample
> called "CPU" and have it's elapsed/latency time set to the CPU value. This
> way, CPU is treated like any other sampler and we can see CPU over time.
> > What I have so far is a JSR223 Sampler with the groovy script. I then
> have a BeanShell PostProcessor. In the BeanShell script, I can set the
> label and latency using:
> > prev.setSampleLabel("CPU");prev.setLatency(19);  //the value is
> hardcoded for now
> > This works, but now I am trying to set the elapsed time as well. I tried
> prev.setStampAndTime, but that is not working.
> > ts = System.currentTimeMillis();prev.setStampAndTime(ts,19);
> >
> > Problem in BeanShell script org.apache.jorphan.util.JMeterException:
> Error invoking bsh method: eval    Sourced file: inline evaluation of:
> ``prev.setSampleLabel("CPU"); ts = System.currentTimeMillis();
> prev.setStampAndTim . . . '' : Method Invocation prev.setStampAndTime
> >
>
> The elapsed time is special: it's set using sampleStart() sampleEnd().
>
> There are various checks to make sure that the times don't get
> accidentally updated.
>
> Sorry, but It's not possible to set a specific elapsed time from a sampler.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

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