JMeter JSR 223语言js vs javascript [英] JMeter JSR 223 language js Vs javascript

查看:297
本文介绍了JMeter JSR 223语言js vs javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于JSR 223 Sampler语言,

About JSR 223 Sampler languages,

我可以选择

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

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

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

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

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

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

有什么区别?看来它们与JavaScript相同.

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)

推荐答案

我认为您无法从此处删除条目,因为正在使用 JMeter类路径中的可用脚本引擎.

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.

关于使用jsjavascript的哪种语言,答案为.建议使用 Groovy语言在JMeter测试中将任何形式的脚本用作行为良好的Groovy脚本可以被编译和缓存,因此它们的性能将非常类似于普通" Java代码,而每次调用其他脚本语言时都会对其进行解释,因此当涉及高负载时,使用JavaScript的JSR223测试元素可能会成为性能瓶颈,并且毁了你的测试.

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.

参考文献:

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

这篇关于JMeter JSR 223语言js vs javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆