暂停和恢复 jmeter 执行 [英] pause and resume jmeter execution
问题描述
我正在寻找暂停和恢复 JMeter 执行(单线程/多线程)的选项.
I am looking for an option to pause and resume JMeter execution (single/multiple threads).
1. Pausing and Resuming through command line
2. From the Jmeter UI
3. By coding in some language in a sampler of Jmeter
4. Using a JMeter plugin
以上任何一种方法都可以.
Any of the above methods is fine.
非常感谢任何想法和解决方案.
Any thoughts and solutions are greatly appreciated.
推荐答案
我建议使用 恒定吞吐量计时器
尽管名称中有常量"一词,但您可以通过 __P() 函数作为目标吞吐量"值.
Despite word "constant" in its name, you can use i.e. JMeter Property via __P() function as "Target Throughput" value.
命令行:您可以通过 -J 命令行参数传递此属性值,例如:
Command-line: you can pass this property value via -J command-line argument like:
- 在JMeter中定义即
throughput
属性为:${__P(throughput,)}
- 告诉" JMeter 的属性值作为
jmeter -Jthroughput=100 -n -t ....
您也可以在运行时修改属性值
You can also amend the property value during the runtime
例如来自使用以下脚本的 Beanshell 测试元素:
for example from Beanshell Test Elements using the following script:
props.put("throughput", "300");
<小时>
我非常确定您会收到许多使用测试的建议来自不太称职的人的行动取样器,他们懒得去熟悉说明:
I'm pretty much sure that you'll receive a number of suggestions to use Test Action sampler from not very competent people who didn't bother to familiarize themselves with documentation which states:
目标当前线程/所有线程(暂停时忽略)
TargetCurrent Thread / All Threads (ignored for Pause)
所以请不要在 Test Action 采样器上浪费时间
So please don't waste your time on the Test Action sampler
这篇关于暂停和恢复 jmeter 执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!