JMeter如何仅控制Transaction Controller父样本吞吐量,无需计算子请求数?
解决JMeter父样本吞吐量控制问题
要让Constant Throughput Timer只关注Transaction Controller生成的父样本,不用按子请求数量调整吞吐量,直接按以下步骤操作:
- 确认你的Transaction Controller已勾选Generate Parent Sample(你已完成此配置)
- 添加Constant Throughput Timer,将其放在能覆盖目标Transaction Controller的作用域下(例如与Transaction Controller同级或上级)
- 设置目标吞吐量为
60(对应每秒1次,即60样本/分钟) - 核心配置:在Calculate Throughput based on下拉选项中,选择
Only parent samples
完成以上设置后,JMeter会仅统计Transaction Controller生成的父样本数量来控制吞吐量,不再将子请求纳入计算范围,这样就能精准实现每秒1次页面加载的目标,无需再根据子请求数量换算吞吐量数值。
内容的提问来源于stack exchange,提问作者JustNatural
相关产品推荐
相关产品推荐

