我是 Jmeter 的新手。这是一件令我困惑的事情
我正在测试两种场景以使用 Jmeter 计算性能数字
在这两种情况下,https 采样器都运行了 50 次,但我注意到了很多性能差异。
For 1 - 100 ms ( Average of 50 calls)
For 2 - 30 ms ( Average of 50 calls)
问题是为什么我会看到这种差异。理想情况下,这两种情况应该给出相同的性能数字。
还要添加我的 Jmeter 设置,我将“使用保持事件”设置为关闭,并且在 jmeter.properties 中将 https.use.cached.ssl.context 设置为 false。
最佳答案
你是什么Ramp-up
在线程组级别定义 50 个循环的场景的设置?根据 documentation
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds
默认情况下,增加是
1
.如果您正在为线程组和循环 Controller 寻找相同的行为,您需要将其设置为 0
.展望 future ,像 JMeter 一样快地发送请求并不是现实生活中的负载场景。真正的用户不会敲打这个或那个端点,他们需要一些时间来“思考”,然后再做下一步行动。这个“思考时间”可以使用即 Constant Timer 来模拟.然而,设置所需负载的更智能方法是使用 Constant Throughput Timer
关于Jmeter - 线程组和循环 Controller 在性能方面的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25651119/