Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to quickly determine the inflection point in JMeter performance testing

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

During the recent performance test execution of  , we often see many testers performing performance tests, looking for inflection points, but the efficiency is too low. This article introduces how to efficiently determine the inflection points of performance testing.

  's so-called performance testing inflection point means that the number of concurrent users reaches a certain number, the average response time increases, TPS decreases instead of increasing, and the error reporting rate increases progressively. The current concurrent users are the inflection point of the test case.

The significance of   looking for the inflection point is whether the average response time, TPS and error reporting rate of the system meet the performance requirements under the current concurrent users. If so, the concurrent user is the maximum number of concurrent users that can meet the needs of users. To consider whether concurrent users meet the needs of system users, we can judge by combining the total number of users of the system and the number of online users. Their relationship is roughly as follows:

Number of online users = total number of system users * 20%

Concurrent users = online users * 30%

For example, if the total number of users of the system is 10000, the number of online users is 2000 and the number of concurrent users is 600.

I. script development

1. First of all, I would like to introduce you how to develop a performance test script that can be executed efficiently. At present, most users are executed at a time by different concurrent users. This method is inefficient and inconvenient for data comparison, as shown below.

First of all, develop the test case, and then copy the case into multiple, and each thread can modify the number of threads and the use case name. As shown below, modify the use case name and the number of threads. In this way, the generated test results will distinguish the response time of the same case under different concurrency, which is convenient for comparison.

If multiple interfaces implement a use case, all interfaces need to be placed under the transaction controller so that a summary result can be generated (statistics of response time of multiple requests, tps equivalent)

Finally, in the test plan, remember to check the option to run each thread group independently. The meaning of this option is to execute 10, 20, 30 and 50 threads concurrently until the end of the stress test.

2. Performance tests are performed through commands, and interface pressure tests are not recommended. The commands are as follows: jmeter-n-t rps.jmx-l summary.jtl-e-o report

Command parsing, summary.jtl generates aggregate reports, report generates html reports that come with jmeter, and there are a variety of graphical reports

3. After the analysis of the execution result is completed, double-click index.html to open the test report

The summary results are as follows: with the increase of concurrent users, the average response time is increasing, the error reporting rate is also increasing, and TPS is also increasing with the increase of the number of users, reaching the peak of 1000 concurrent users.

Looking at the Response Times Over Time chart, we can see that with the increase of the number of concurrent users, the average response time increases all the time. When the concurrency is changed from 500concurrency to 1000 concurrency, the response time increases most.

  looks at Transactions Per Second, and you can see from the chart that when the number of concurrent users increases from 10 to 400, it always increases, and then 500-1000, it begins to decrease slowly.

Looking at Response Time Percentiles, it can be seen from the figure that only 2.5% of the 1000 concurrent users have a response time of less than 5 seconds, others are more than 5 seconds, and 50% are more than 7 seconds. For a simple query, the response time is no longer acceptable to users.

Looking at Hits Per Second, we can see from the chart that when concurrent users increase from 10 to 400, the number of requests per second has been increasing, and then 500-1000, the number of requests began to decrease instead of increasing.

In the concurrency scenario of the test case execution in this paper, the inflection point is 500 concurrency, and the specific case needs to be analyzed in combination with the test results.

    if the article is helpful to you, Huan × × × synchronization, convenient for everyone to consult, I will continue to publish articles related to testing, share testing techniques with you, every original article is written attentively, put an end to plagiarism

QQ technology exchange group: please enter the verification information 51CTO to add the group.

* * Wechat 2 × ×  

* * download resources, you can get the download addresses of various resources shared by yourself * *

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report