简体   繁体   English

Jmeter - 并发和事件生成

[英]Jmeter - concurrency and events generation

I have a data model JSON object which has 900 events sampling at 1-second intervals.我有一个数据模型 JSON 对象,它以 1 秒的间隔采样 900 个事件。 I have to split these 900 events into 60 events fragments, send 60 events at particular reps once these 60 are done next 60 should be sent for the same users.我必须将这 900 个事件拆分为 60 个事件片段,一旦这 60 个完成,就以特定的代表发送 60 个事件,接下来 60 个应该发送给相同的用户。 how can I achieve do I need multiple concurrent thread?我怎样才能实现我需要多个并发线程?

  1. For sending data in chunks of 60 "events" you can use Synchronizing Timer with "Number of Simulated Users to Group by" set to 60 and a Thread Group with 60 threads (virtual users)要以 60 个“事件”的块发送数据,您可以使用同步计时器,将“模拟用户分组数”设置为60并使用具有 60 个线程(虚拟用户)的线程组

  2. For extracting data out of the JSON data model you can use HTTP Request sampler with file protocol like:为了从 JSON 数据模型中提取数据,您可以将 HTTP 请求采样器与file协议一起使用,例如:

    在此处输入图片说明

    it will return the full content of your "data model" file as the response and you should be able to extract "events" using JSON Extractor or JSON JMESPath Extractor它将返回“数据模型”文件的完整内容作为响应,您应该能够使用JSON ExtractorJSON JMESPath Extractor提取“事件”

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

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