如何在JMeter中显示实际循环计数 [英] How to display actual loop count in JMeter
问题描述
我们可以通过以下方式显示实际线程:
${__threadNum}
We can display the actual thread by:
${__threadNum}
实际的循环计数是否有类似的东西?
Is there something similar for the actual loop count?
推荐答案
您可以使用${__jm__Thread Group__idx}
获取当前循环迭代
You can use ${__jm__Thread Group__idx}
to get current loop iteration
${__jm__Thread Group__idx}
请注意,这是JMeter 5常规增强功能的一部分,它公开了循环计数
Notice this is part of a general enhancement in JMeter 5 for exposing the loop count
现在,Controller导出一个包含其当前索引为
__jm__<Name of your element>__idx
的变量.因此,例如,如果您的While Controller命名为WC
,则可以通过${__jm__WC__idx}
While Controller now exports a variable containing its current index named
__jm__<Name of your element>__idx
. So for example, if your While Controller is namedWC
, then you can access the looping index through${__jm__WC__idx}
这篇关于如何在JMeter中显示实际循环计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!