You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Glenn Caccia <ga...@yahoo.com> on 2013/11/19 18:40:32 UTC

JSR223 Postprocessor and response times

I have a test that includes a REST sampler with a XPath Extractor, JSR223 Post Processor and a Response Assertion.  I'm running 35 threads with a Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was testing to see what impact each of these sub elements has to recorded response time.  With all three sub elements disabled, I get an 90% response time of 90ms.  With XPath Extractor and Response Assertion enabled and JSR223 Post Processor disabled, I still get a 90% response time of 90ms.  But when I enable the JSR223 Post Processor, response times at 90% suddenly jump up over 300ms.

Is it expected that the JSR223 Post Processor should have such a big impact on response times?  I'm using groovy and the script is fairly simple:

def sessionData = vars.getObject("sessionData");
sessionData.add(new ArrayList([vars.get("GUID"), vars.get("sessionId")]));
vars.putObject("sessionData",sessionData);

Is there some way to speed this up?  Why does this impact response times?  Shouldn't a response time exclude post processing activities?  The jmeter server resources are not getting maxed out with this test.

Thanks,

Glenn

Re: JSR223 Postprocessor and response times

Posted by Deepak Shetty <sh...@gmail.com>.
>Why does this impact response times?  Shouldn't a response time exclude
post processing activities?
In general , if you run a single thread it wont. if you run multiple
threads , then the thread that reads a response has to contend for
resources with other threads (some of who might be doing post processing)
and that impacts the response time your thread sees.

>The jmeter server resources are not getting maxed out with this test.
maxed out != no overhead - especially in a java world.


On Tue, Nov 19, 2013 at 9:40 AM, Glenn Caccia <ga...@yahoo.com> wrote:

> I have a test that includes a REST sampler with a XPath Extractor, JSR223
> Post Processor and a Response Assertion.  I'm running 35 threads with a
> Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was
> testing to see what impact each of these sub elements has to recorded
> response time.  With all three sub elements disabled, I get an 90% response
> time of 90ms.  With XPath Extractor and Response Assertion enabled and
> JSR223 Post Processor disabled, I still get a 90% response time of 90ms.
> But when I enable the JSR223 Post Processor, response times at 90% suddenly
> jump up over 300ms.
>
> Is it expected that the JSR223 Post Processor should have such a big
> impact on response times?  I'm using groovy and the script is fairly simple:
>
> def sessionData = vars.getObject("sessionData");
> sessionData.add(new ArrayList([vars.get("GUID"), vars.get("sessionId")]));
> vars.putObject("sessionData",sessionData);
>
> Is there some way to speed this up?  Why does this impact response times?
> Shouldn't a response time exclude post processing activities?  The jmeter
> server resources are not getting maxed out with this test.
>
> Thanks,
>
> Glenn

Re: JSR223 Postprocessor and response times

Posted by Philippe Mouawad <ph...@gmail.com>.
Cache key is critical for performances of jsr223 test elements.
It needs to be a unique name accross all test plan ( whatever you want).
It will make jmeter use compilation feature of jsr223 engine (if available)
and as a consequence performances will be very close to compiled java code.

It is available for groovy at least.
Regards
@philmdot

On Tuesday, November 19, 2013, Glenn Caccia wrote:

> Apparently I'm a liar.  Just ran the test again and now I'm getting much
> closer to the same response times with JSR223 enabled or disabled.  I had
> run it multiple times yesterday and it seemed consistently high.  Looks
> like a false alarm.  However, for future reference, could someone enlighten
> me on when and how to use a cache key?
>
> Thanks,
>
> Glenn
>
>
>
>
>
> On , Glenn Caccia <gacaccia@yahoo.com <javascript:;>> wrote:
>
> I'm using JMeter 2.10.  I did not add a cache key.  Don't know what that
> is (I see the option, but don't know what to do with it).  I'm not using a
> transaction controller.
>
>
>
>
>
> On Tuesday, November 19, 2013 9:54 AM, Philippe Mouawad <
> philippe.mouawad@gmail.com <javascript:;>> wrote:
>
> Can you show your test plan structure ?
> Are you using TransactionController
>  ?
> For jsr did you add cache key?
> Which jmeter version are you using ?
>
>
> On Tuesday, November 19, 2013, Glenn Caccia wrote:
>
> > I have a test that includes a REST sampler with a XPath Extractor, JSR223
> > Post Processor and a Response Assertion.  I'm running 35 threads with a
> > Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was
> > testing to see what impact each of these sub elements has to recorded
> > response time.  With all three sub elements disabled, I get an 90%
> response
> > time of 90ms.  With XPath Extractor and Response Assertion enabled and
> > JSR223 Post Processor disabled, I still get a 90% response time of 90ms.
> > But when I enable the
>  JSR223 Post Processor, response times at 90% suddenly
> > jump up over 300ms.
> >
> > Is it expected that the JSR223 Post Processor should have such a big
> > impact on response times?  I'm using groovy and the script is fairly
> simple:
> >
> > def sessionData = vars.getObject("sessionData");
> > sessionData.add(new ArrayList([vars.get("GUID"),
> vars.get("sessionId")]));
> > vars.putObject("sessionData",sessionData);
> >
> > Is there some way to speed this up?  Why does this impact response times?
> > Shouldn't a response time exclude post processing activities?  The jmeter
> > server resources are not getting maxed out with this test.
> >
> > Thanks,
> >
> > Glenn
>
>
>
> --
> Cordialement.
> Philippe Mouawad.



-- 
Cordialement.
Philippe Mouawad.

Re: JSR223 Postprocessor and response times

Posted by Glenn Caccia <ga...@yahoo.com>.
Apparently I'm a liar.  Just ran the test again and now I'm getting much closer to the same response times with JSR223 enabled or disabled.  I had run it multiple times yesterday and it seemed consistently high.  Looks like a false alarm.  However, for future reference, could someone enlighten me on when and how to use a cache key?

Thanks,

Glenn





On , Glenn Caccia <ga...@yahoo.com> wrote:
 
I'm using JMeter 2.10.  I did not add a cache key.  Don't know what that is (I see the option, but don't know what to do with it).  I'm not using a transaction controller.





On Tuesday, November 19, 2013 9:54 AM, Philippe Mouawad <ph...@gmail.com> wrote:
 
Can you show your test plan structure ?
Are you using TransactionController
 ?
For jsr did you add cache key?
Which jmeter version are you using ?


On Tuesday, November 19, 2013, Glenn Caccia wrote:

> I have a test that includes a REST sampler with a XPath Extractor, JSR223
> Post Processor and a Response Assertion.  I'm running 35 threads with a
> Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was
> testing to see what impact each of these sub elements has to recorded
> response time.  With all three sub elements disabled, I get an 90% response
> time of 90ms.  With XPath Extractor and Response Assertion enabled and
> JSR223 Post Processor disabled, I still get a 90% response time of 90ms.
> But when I enable the
 JSR223 Post Processor, response times at 90% suddenly
> jump up over 300ms.
>
> Is it expected that the JSR223 Post Processor should have such a big
> impact on response times?  I'm using groovy and the script is fairly simple:
>
> def sessionData = vars.getObject("sessionData");
> sessionData.add(new ArrayList([vars.get("GUID"), vars.get("sessionId")]));
> vars.putObject("sessionData",sessionData);
>
> Is there some way to speed this up?  Why does this impact response times?
> Shouldn't a response time exclude post processing activities?  The jmeter
> server resources are not getting maxed out with this test.
>
> Thanks,
>
> Glenn



-- 
Cordialement.
Philippe Mouawad.

Re: JSR223 Postprocessor and response times

Posted by Glenn Caccia <ga...@yahoo.com>.
I'm using JMeter 2.10.  I did not add a cache key.  Don't know what that is (I see the option, but don't know what to do with it).  I'm not using a transaction controller.





On Tuesday, November 19, 2013 9:54 AM, Philippe Mouawad <ph...@gmail.com> wrote:
 
Can you show your test plan structure ?
Are you using TransactionController ?
For jsr did you add cache key?
Which jmeter version are you using ?


On Tuesday, November 19, 2013, Glenn Caccia wrote:

> I have a test that includes a REST sampler with a XPath Extractor, JSR223
> Post Processor and a Response Assertion.  I'm running 35 threads with a
> Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was
> testing to see what impact each of these sub elements has to recorded
> response time.  With all three sub elements disabled, I get an 90% response
> time of 90ms.  With XPath Extractor and Response Assertion enabled and
> JSR223 Post Processor disabled, I still get a 90% response time of 90ms.
> But when I enable the JSR223 Post Processor, response times at 90% suddenly
> jump up over 300ms.
>
> Is it expected that the JSR223 Post Processor should have such a big
> impact on response times?  I'm using groovy and the script is fairly simple:
>
> def sessionData = vars.getObject("sessionData");
> sessionData.add(new ArrayList([vars.get("GUID"), vars.get("sessionId")]));
> vars.putObject("sessionData",sessionData);
>
> Is there some way to speed this up?  Why does this impact response times?
> Shouldn't a response time exclude post processing activities?  The jmeter
> server resources are not getting maxed out with this test.
>
> Thanks,
>
> Glenn



-- 
Cordialement.
Philippe Mouawad.

Re: JSR223 Postprocessor and response times

Posted by Philippe Mouawad <ph...@gmail.com>.
Can you show your test plan structure ?
Are you using TransactionController ?
For jsr did you add cache key?
Which jmeter version are you using ?

On Tuesday, November 19, 2013, Glenn Caccia wrote:

> I have a test that includes a REST sampler with a XPath Extractor, JSR223
> Post Processor and a Response Assertion.  I'm running 35 threads with a
> Uniform Random Timer with a base of 300ms and a variance of 100ms.  I was
> testing to see what impact each of these sub elements has to recorded
> response time.  With all three sub elements disabled, I get an 90% response
> time of 90ms.  With XPath Extractor and Response Assertion enabled and
> JSR223 Post Processor disabled, I still get a 90% response time of 90ms.
> But when I enable the JSR223 Post Processor, response times at 90% suddenly
> jump up over 300ms.
>
> Is it expected that the JSR223 Post Processor should have such a big
> impact on response times?  I'm using groovy and the script is fairly simple:
>
> def sessionData = vars.getObject("sessionData");
> sessionData.add(new ArrayList([vars.get("GUID"), vars.get("sessionId")]));
> vars.putObject("sessionData",sessionData);
>
> Is there some way to speed this up?  Why does this impact response times?
> Shouldn't a response time exclude post processing activities?  The jmeter
> server resources are not getting maxed out with this test.
>
> Thanks,
>
> Glenn



-- 
Cordialement.
Philippe Mouawad.