在 JMeter 中绘制自定义变量 [英] Graph a custom variable in JMeter
本文介绍了在 JMeter 中绘制自定义变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个简单的Java 请求"采样器(即:AbstractJavaSamplerClient).如何从此采样器生成自定义变量并绘制这些变量?(最好使用开箱即用的图形侦听器).目前我只能轻松地绘制采样时间图.
I have a simple "Java Request" sampler (ie: AbstractJavaSamplerClient). How do I produce custom variables from this sampler and graph these? (Preferably with out-of-the-box graphing listeners). Currently I can only easily graph sample times.
推荐答案
将你的 var 放入 JMeter:
Put your var in JMeter:
JMeterContextService.getContext().getVariables().put("YOUR_VAR", value)
并添加 user.properties:
And add in user.properties:
sample_variables=YOUR_VAR
您的变量将以 CSV 或 XML 格式输出.
Your var will be output in CSV ou XML.
然后你就可以使用它了.
You can then use it.
这篇关于在 JMeter 中绘制自定义变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文