JMeter JSR 223 language js Vs javascript

放肆的年华 提交于 2019-12-20 02:16:53

问题


About JSR 223 Sampler languages,

I can choose between

javascript (ECMAScript ECMA 262 Edition 51 / Oracle Nashorn 1.8.0_144)

and

js (ECMAScript ECMA 262 Edition 51 / Oracle Nashorn 1.8.0_144)

and

nashorn (ECMAScript ECMA 262 Edition 51 / Oracle Nashorn 1.8.0_144)

What's the difference? it seems that they are the same as JavaScript.

Can I edit the list somehow? remove unused script languages?

(There's also ecmascript language with same properties)


回答1:


I don't think you will be able to remove entries from there as the drop down is being populated on-the-fly using ScriptEngineManager.getEngineFactories() method which performs discovery of available scripting engines in JMeter Classpath.

With regards which language to use js or javascript the answer is none. It is recommended to use Groovy language for any form of scripting in JMeter tests as well-behaved Groovy scripts can be compiled and cached therefore their performance will be pretty like to "normal" Java code while other scripting languages are being interpreted each time they are being called so when it comes to high loads your JSR223 test element using JavaScript might become a performance bottleneck and ruin your test.

References:

  • JMeter Best Practices: JSR223 Elements
  • Apache Groovy - Why and How You Should Use It


来源:https://stackoverflow.com/questions/45668451/jmeter-jsr-223-language-js-vs-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!