Performance test - Jmeter interface processing no less than 200 times/second - scenario

Requirement: It is expected that the processing capacity of an interface system is not less than 200 times/second. How to design it?

① This scenario is to see if the TPS value of the server for a certain interface can be greater than or equal to 200, and that’s it;

②System processing capability: This is the TPS in our performance test;

③ As long as the TPS of a target scenario can exceed 200 without reporting an error and the response time is within an acceptable range;

Jmeter design operation:

TPS, many people will definitely think of throughput and look for a breakthrough in throughput.

A "Constant Throughput Timer" can also be used to preset a fixed value of 12,000, because in this timer, the unit is per minute, thereby achieving the target of 200TPS.

This timer can indeed achieve such a goal. But the next question is, using a common thread group, how many concurrent users should be set to achieve this TPS value?

If the setting of concurrent users (number of threads) is small, this goal cannot be achieved. If the setting is large, the real TPS value cannot be found. Guessing the number of concurrent users one by one is a waste of time and is too inefficient.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

 

solution:

①Download Jmeter’s plug-in manager at: https://jmeter-plugins.org/

Then use the plug-in manager to download the jpgc plug-in. Then add bzm - Arrivals Thread Group thread group.

第一个 Target Rate 设置为目标12000,因为时间是分钟;
第二个 RampUpTime 加速时长,随自己设置;
第三个 Ramp-Up Steps Count 总共加速次数,随自己设置;
第四个 Hold Target Rate Time 达到目标后,持续运行多长时间,随自己设置。
第五个 Tips:在图表graph下面,有个Time Unit 单选,分钟\秒,切换后,上面的设置单位会发生变化,注意切换后,要按照需求更改相关设置数据。

working process:

整个设置过程,完全没有设置并发用户数。也就是说,为了达到200TPS值,并发用户数,完全是在运行过程中动态调整变化的。
我们只需要再添加 Active Threads Over Time 监听器,查看运行过程中,实时的并发用户数,

再添加 Transactions per Second 监听器, 查看运行过程中,实时TPS值,
我们就可以通过这两个监听器,实时对比看到,在某个时间点TPS达到或超过200,此时活跃的并发用户的值,就知道系统在多少并发用户数时,能满足预期目标;

如果发现运行过程中,已经报错,或相应时间超长,TPS却始终都无法达到预期的200,哪就说明,该接口无法达到预期目标。

② If you still want to know how many concurrent users (number of threads) are needed to make the interface reach 200TPS, you can use another Stepping Thread Group.

By observing the number of active threads and tps value in real time, you can more accurately find the number of concurrent users.

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/133147313