Thanks. I am trying to avoid installing an agent on the servers. I guess one way is to create a JMX sampler similar to https://github.com/smartrics/JMeterRestSampler
> Date: Fri, 1 Feb 2013 10:06:55 +0200 > Subject: Re: Setting elapsed and latency times > From: [email protected] > To: [email protected] > > 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 <[email protected]> wrote: > > > On 31 January 2013 17:30, Marcelo Jara <[email protected]> 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: [email protected] > > For additional commands, e-mail: [email protected] > > > >
