简体   繁体   English

JMeter,带循环的请求率 controller

[英]JMeter, request rate with loop controller

I have this situation:我有这种情况:

  • LoopCount循环计数
    • BeanShell prepocessor (calcualte some parameters to pass to java request object) BeanShell前处理器(计算一些参数传递给java请求对象)
    • Java Requests Java 请求

With this setup the rate reached is 1 req/sec.使用此设置,达到的速率为 1 req/sec。
Is it possible, maintaining this structure, to increase the rate of requests?是否有可能保持这种结构来提高请求率?
Thanks everyone!感谢大家!

There are 2 constraints which limit the "rate":有两个限制“速率”的约束:

  1. JMeter must be able to send requests fast enough JMeter 必须能够足够快地发送请求
  2. Application must be able to respond fast enough应用程序必须能够足够快地响应

So I'd suggest taking the following steps:所以我建议采取以下步骤:

  1. First of all try switching from Beanshell PreProcessor to JSR223 PreProcessor with Groovy as the language because Beanshell interpreter might be the bottleneck .首先尝试使用 Groovy 作为语言从 Beanshell PreProcessor 切换到 JSR223 PreProcessor,因为Beanshell 解释器可能是瓶颈
  2. Try increasing the number of threads in the Thread Group because if you have only 1 thread and cumulative elapsed time of the PreProcesor and Java Requests is 1 second you won't be able to run the requests faster尝试增加线程组中的线程数,因为如果您只有 1 个线程并且 PreProcesor 的累积运行时间和 Java 请求为 1 秒,您将无法更快地运行请求
  3. If you're limited with your machine resources - try running your test in distributed mode如果您的机器资源有限 - 尝试以分布式模式运行测试
  4. If after applying the above suggestions you're still stuck at 1 request per second rate - most probably it's the system you're testing limitation如果在应用上述建议后,您仍然停留在每秒 1 个请求的速度 - 很可能是您正在测试的系统限制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM