0

我正在尝试查看是否可以在 JMeter 中模拟突发模式(2.x - 这是我在这个特定环境中可以访问且无法升级的唯一版本),具有持续负载,并且在某些情况下具有固定的持续时间/飞行时间间隔。

例如,我想用 4 个 80 个用户的独立线程组淹没目标,每 30 分钟一次,持续大约 5 分钟。这是对现有主线程组的补充,该线程组永远(24 小时以上)同时发出 200 个请求。

尝试了这个答案,但是,我没有看到欲望效应。我的 JMeter 设置如下:

- A main thread user group (200 users, 5 secs ramp-up, forever loop)
   - It contains 4 separate HTTP Requests as its children (they get called as long as the script is not shutdown)
- 1st separate thread group with 80 threads, 5 secs ramp-up, forever loop; as its children:
   - "Constant Timer" for interval invocation, e.g. every 30 mins
   - "Runtime Controller" for duration/flight-time configuration, e.g. 5 mins continuously
   - "Loop Controller" to iteratively executing the requests, set to forever loop (I even tried fixed numbers, e.g. 10)
   - An actual `HTTP Request`
- 2nd separate thread group with identical setup except different HTTP Request
- 3rd separate thread group with identical setup except different HTTP Request
- 4th separate thread group with identical setup except different HTTP Request

我尝试使用Ultimate Thread Group,但似乎它不会创建浪涌模式,但它会在设定的持续时间内执行它。请求在该时间段内均匀分布,而不是以突发模式发送到目标服务器。因此,它似乎只订阅发送的请求数等于该持续时间内的线程数。

我希望这些浪涌线程组中的那些线程在整个配置的持续时间内连续发送请求,不间断,类似于主负载线程组,而不是只发送 X 数量的请求(等于线程数)一次.

这是可以实现的

4

2 回答 2

0

我不认为 Constant Timer 是正确的选择,因为它会在其范围内的每个 HTTP 请求采样器之前产生 30 分钟的延迟。

如果您想等待 30 分钟,然后在完全相同的时刻释放所有 80 个线程:

  1. 添加测试操作采样器并将其配置为“休眠”30 分钟
  2. 添加同步计时器,以便所有 80 个线程作为此测试操作采样器的子级一起“休眠”
  3. 添加真正的工作的 HTTP 请求采样器
  4. 添加与 HTTP 请求采样器的子相同的同步计时器

这样,您将每 30 分钟有 80 个用户访问您的服务器

于 2020-07-06T17:25:22.163 回答
0

您可能需要切换到 SaaS 产品以同时支持这么多请求,例如https://rungutan.com

于 2020-07-06T09:32:38.147 回答