Hello, I bounce again on this one as I had an interesting experience this evening;
I was creating a Template for MongoDB, I started creating it with Beanshell, and found it strange that throughput was so bad 25 Threads, no pause time, one insert, one count: - Generate Summary Results = 95514 in 300s = 318.3/s Avg: 74 Min: 2 Max: 536 Err: 0 (0.00%) I analyzed a bit and to my surprise time was spent in Beanshell So I decided to write the same in JSR223+Groovy+Caching: - Generate Summary Results = 1171779 in 300s = 3905.8/s Avg: 6 Min: 0 Max: 648 Err: 0 (0.00%) Results: - Groovy cached performs > 11 times better than Beanshell. *So I am convinced we should ship Groovy with JMeter to encourage users to use it by default.* Look at the comment at bottom of this page (I am not saying it is representative but It is interesting to know how users think and use JMeter sometimes) - http://www.ubik-ingenierie.com/blog/jmeter_control_percentage_of_sampler/ What does he say ? => The main advantage is that BeanShell is installed by *default* with JMeter Opinions ? On Fri, Jul 5, 2013 at 5:30 PM, sebb <[email protected]> wrote: > On 5 July 2013 16:24, Danny Lade <[email protected]> wrote: > >> -----Ursprüngliche Nachricht----- > >> Von: sebb [mailto:[email protected]] > >> Gesendet: Freitag, 5. Juli 2013 16:29 > >> An: [email protected] > >> Betreff: Re: Groovy > >> > >> > I'm not sure how could you know the code about JSR223TestElement is > >> > implementing the support for "script compilation caching", so here > comes > >> some short code: > >> > > >> > processFileOrScript() > >> > // Hack as in bsh-2.0b5.jar BshScriptEngine implements > Compilable but > >> throws new Error > >> > boolean supportsCompilable = scriptEngine instanceof > Compilable > >> > && > >> > !(scriptEngine.getClass().getName().equals("bsh.engine.BshScriptEngine > >> > ")); > >> > > >> > Because the JavaScriptEngine is based on the BshScriptEngine the > "script > >> compilation caching" > >> > isn't available for Java, but it is available for groovy. > >> > >> Which JavaScriptEngine? > >> > > There is no physical implementation, but if you use the "JSR223 Sampler" > it provides the language "Java". This is made via the > BshScriptEngineFactory which provides the information it also "speaks" Java. > > OK, I see. > > > (see > https://code.google.com/p/beanshell2/source/browse/trunk/src/bsh/BshScriptEngineFactory.java?r=94 > ) > > However, the "script compilation caching" does not work for Java > (provided by BshScriptEngine). > > > > Besides that, it seems they removed the Java support in newer versions > (see same link, but newest version). You should consider that if you think > about using "bsh-2.1b5.jar" in the future. > > No, we cannot use beanshell2 from that source as it is GPL. > However the original beanshell code is hopefully coming to Apache. > > >> > I'm not saying "you must install groovy" , I just want to be sure > >> > having a scripting engine with "script compilation caching" working > (or without > >> any synchronization during runtime). > >> > >> What I am saying is that there is no need to include Groovy in the > JMeter binary > >> release. > >> It works just as well if it is downloaded separately. > >> > >> And if the BSH Compilable bug can be fixed, users could then use > BeanShell. > >> > > It's the same on me, I just want to point out the "script compilation > caching" with BeanShell. > > All I did was to suggest possible solutions (IMO), the decision is all > yours. > > > > Greetings Danny > > > -- Cordialement. Philippe Mouawad.
