And note that in my results throughput is >>>> 7 <<<< times better with JSR223 + Groovy compared to Beanshell on a 4 year old machine Intel Core 2 Duo 3Ghz.
On Tue, Jan 15, 2013 at 7:54 AM, Philippe Mouawad < [email protected]> wrote: > Great, spread the news :) > > And with 2.8 you have the same effect provided you put groovy script in > external file and not in text area. > > Regards > Philippe > > On Tuesday, January 15, 2013, He Yin(测试部_贺寅) wrote: > >> Aha, I saw the new added form field in nightly build. >> With this option set, I can see jsr233+groovy's tps about 30% greater >> than beanshell . >> Thank you for your reply. >> >> Regards >> Joey He >> >> > Philippe Mouawad [mailto:[email protected]] >> > 2013年1月15日 14:20 >> > [email protected] >> > Re: Scripting language performance >> > >> >In nightly build,f you don't add cache key and use text area then script >> is not compiled so perfs are not good. >> >Adding a unique cache key is enough to make the script compiled when >> language is compilable as groovy is. >> >jsr223.compiled_scripts_cache_size just controls the size of cache, >> increase its value if you have more than 100 different jsr223 element. >> > >> >In 2.8, To make compilation active, put script in external file. >> > >> > >> >In my opinion and according to the results I get, conclusion is : >> > >> >- in 2.9=> use jsr223 + groovy in text area+ cache key or as below if >> you are ok to put your script code in external file >> > >> >- in 2.8 => use jsr223 + groovy script in file >> > >> >Regards >> >Philippe >> >On Tuesday, January 15, 2013, He Yin(测试部_贺寅) wrote: >> > >> >> Hello, >> >> In the previous test, I put the script code in text area. I guess >> >> that makes the different. >> >> I re-ran my tests under JMeter nightly build, with script codes in >> file. >> >> The results show that jsr223 +groovy ran very well with rsp around >> >> 1ms, and beanshell sampler became a little slower, not that slow like >> yours. >> >> >> >> I'm not understanding the cache key you said, is that about " >> >> jsr223.compiled_scripts_cache_size" in jmeter.properties? >> >> >> >> Whatever, do we have some conclusion here? Like better use >> >> JSR223/groovy with code in file or beanshell if code directly put in >> textarea. >> >> I think in most cases we just put code in textarea for convenience. >> >> >> >> >> >> >Philippe Mouawad [mailto:[email protected] >> >> ><javascript:;>] >> >> >2013年1月15日 4:39 >> >> >[email protected] <javascript:;> >> >> >Re: Scripting language performance >> >> > >> >> >Hello, >> >> >I just tested a simple test plan with JMeter nightly build / GUI Mode >> >> >on >> >> Mac OSX : >> >> > >> >> >-server -Xmx512m -Xms512m -Dsun.rmi.dgc.client.gcInterval=600000 >> >> >-Dsun.rmi.dgc.server.gcInterval=600000 -Duser.language=en >> >> -Duser.language=en -Duser.region=EN >> >> > >> >> > >> >> >1) >> >> >- JSR223 Sampler with your code >> >> >- Aggregate Report >> >> > >> >> >2) >> >> >- Beanshell Sampler with your code >> >> >- Aggregate Report >> >> > >> >> > >> >> >Results for JSR223 + GROOVY + Cache key >> >> > >> >> >Label / Samples / Average / Median / 90%Line / Min /Max / Error% / >> >> Throughput / KB/Sec >> >> > JSR223 Sampler / 5000 / >> >> >0 / 0 / 1 / 0 / 16 / 0.0 / 2820.1 / 0.0 Results for Beanshell Sampler >> >> >: >> >> >Label / Samples / Average / Median / 90%Line / Min /Max / Error% / >> >> Throughput / KB/Sec BeanShell Sampler / 5000 / 22 / 21 / 37 / 2 / 136 >> >> / >> >> 0.0 / 389.9 / >> >> >0.0 >> >> >So for me *JSR223+Groovy+Caching* is way better provided *provided >> >> Caching is active*, when it's not then results are the following : >> >> > >> >> >Label / Samples / Average / Median / 90%Line / Min /Max / Error% / >> >> Throughput / KB/Sec >> >> > JSR223 Sampler / 5000 / 99 / 67 / 177 / 7 / 4723 / 0.0 / >> >> >86.9 / >> >> >0.0 >> >> >Regards >> >> >Philippe >> >> > >> >> >UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie> >> >> > >> >> >UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/> >> >> > >> >> >On Mon, Jan 14, 2013 at 9:24 PM, Philippe Mouawad < >> >> [email protected] <javascript:;>> wrote: >> >> > >> >> >> Hello, >> >> >> Sorry I read your mail too fast. >> >> >> My questions: >> >> >> >> >> >> - Where did you put the Groovy script code (in text area or in >> >> >> file >> >> )? >> >> >> >> >> >> >> >> >> Could you try it with JMeter nightly build ? >> >> >> >> >> >> Thanks >> >> >> Regards >> >> >> Philippe >> >> >> >> >> >> >> >> >> On Mon, Jan 14, 2013 at 12:37 PM, Philippe Mouawad < >> >> >> [email protected]> wrote: >> >> >> >> >> >>> Hello, >> >> >>> I would be very interested in the Test Plan you used. >> >> >>> Which version did you use ? Nightly or 2.8 ? >> >> >>> If 2.8, where did you put the script code (in text or in file )? >> >> >>> >> >> >>> The tests I made (where the script part was not very consequent) >> >> >>> showed >> >> >>> JSR223 + GROOVY + CACHING as the best option and showed better >> >> >>> results than Beanshell. >> >> >>> >> >> >>> I am not surprised about javascript not being the good one but >> >> >>> other results surprise me a bit. >> >> >>> >> >> >>> Regards >> >> >>> Philippe >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> On Mon, Jan 14, 2013 at 11:16 AM, He Yin(测试部_贺寅) >> >> >>> <[email protected] >> >> >wrote: >> >> >>> >> >> >>>> Sorry, I'm not used to writing in plain text mode and missed my >> >> >>>> signature~ >> >> >>>> >> >> >>>> Best regards, >> >> >>>> Joey He >> >> >>>> >> >> >>>> >Hello, >> >> >>>> > In another thread, I noticed Philippe mentioned that " JSR223 >> >> >>>> Samplers + Groovy + Caching" is a better choice then Beanshell. >> >> >>>> Since I used a lot of Beanshell in my scripts and never pay >> >> >>>> attention to it, I decided to make an investigation of this >> issue. >> >> >>>> > I simplified one of my beanshell script, rewrited it into >> >> >>>> > groovy and >> >> >>>> rhino and put them into script-samplers instead of >> pre-processors. >> >> >>>> >The result turned out that >> >> >>>> >1) Beanshell is better than other solutions >> >> >>>> >2) Groovy and javascript will cause some gc problems. >> >> >>>> >3) Groovy is the slowest. >> >> >>>> >3) BSF and JSR223 seems that waste some cpu time on their >> framework. >> >> >>>> > >> >> >>>> >Am I doing something wrong? >> >> >>>> > >> >> >>>> >(Thread:10, Loop 500) >> >> >>>> >Label Samples Average Median 90% Min Max Error% >> >> >>>> Throughput KB/sec GC occurs >> >> >>>> >JSR223-groovy 5000 59 39 119 6 3077 0 >> >> >>>> 145.2137546 0 1~2 >> >> >>>> >JSR223-rhino 5000 2 1 2 0 314 0 >> >> >>>> 851.9338899 0 frequently >> >> >>>> >BeanShell Sampler 5000 1 1 2 0 >> 402 >> >> >>>> 0 1068.832835 0 0 >> >> >>>> >BSF-beanshell 5000 33 27 63 3 > > > > -- > Cordialement. > Philippe Mouawad. > > > > -- Cordialement. Philippe Mouawad.
