Hematemesis sorting, analysis and explanation of the most important indicators of performance testing, one-step clearance...


Preface

QPS Queries Per Second is the query rate per second, which is the number of queries a server can respond to per second. It is a measure of the traffic processed by a specific query server within a specified time, that is, the number of response requests per second, also That is the maximum throughput capacity.

TPS:
TPS Transactions Per Second is the number of transactions/second. A transaction refers to the process in which a client sends a request to the server and the server responds. The client starts timing when sending a request and ends timing after receiving the server's response to calculate the time used and the number of completed transactions.

The difference between QPS and TPS:
1. Tps is the number of transactions processed per second, including

The user requests the server; the server's own internal processing; the server returns to the user
. N of these three processes can be completed per second, and Tps is N;

2. Qps is basically similar to Tps, but the difference is that a visit to a page forms a Tps; but a page request may generate multiple requests to the server. These requests by the server can be counted as "Qps" among.

For example: accessing a page will request the server 3 times, and once it is released, a "T" will be generated and 3 "Q" will be generated.

For example: A big eater can eat 10 buns in one second, and a girl can eat 1 bun in 0.1 seconds. Are they the same? The answer is no, because this girl cannot eat 10 buns in one second. She may take a long time to eat. At this time, the big eater is equivalent to TPS, and this girl is QPS. Although they are similar, they are actually different.

Concurrency number:
Concurrency number (concurrency degree): refers to the number of requests that the system can handle at the same time, which also reflects the load capacity of the system. This value can be obtained by analyzing the number of access logs on the machine within 1 second.

Throughput:
Throughput: Throughput refers to the number of requests processed by the system per unit time. TPS and QPS are common quantitative indicators of throughput.

System throughput factors

The throughput (pressure-bearing capacity) of a system is closely related to the CPU consumption of requests, external interfaces, IO, etc.

The higher the CPU consumption of a single request, the slower the external system interface and IO impact, the lower the system throughput, and vice versa.

Important parameters

QPS (TPS), number of concurrencies, response time

QPS (TPS): number of requests/transactions per second
Concurrency: number of requests/transactions processed by the system at the same time
Response time: generally average response time

relation

QPS(TPS)=number of concurrencies/average response time

The throughput of a system is usually determined by two factors: QPS (TPS) and concurrency. Each system has a relative limit value for these two values. Under the access pressure of application scenarios, as long as a certain item reaches the highest value of the system, the system throughput If the pressure continues to increase, the throughput of the system will decrease instead. The reason is that the system is overloaded, context switching, memory and other consumption lead to a decrease in system performance.

PV:
PV (Page View): Page views, that is, page views or clicks, which are calculated every time the user refreshes. You can obtain statistics on the access logs of the service for one day.

UV:
UV (Unique Visitor): Unique visitor, counts the number of users who visit a site within 1 day. The access logs of the service for one day can be collected and deduplicated based on the user's unique identifier. Response time (RT): Response time refers to the time it takes for the system to respond to a request. Generally, the average response time is taken. It can be obtained through Web Servers such as Nginx and Apache.

DAU:
DAU (Daily Active User), the number of daily active users. Often used to reflect the operation of websites, Internet applications or online games. DAU usually counts the number of users who logged in or used a certain product within one day (statistical day) (excluding users who logged in repeatedly), which is similar to the concept of UV

MAU:
MAU (Month Active User): The number of monthly active users, which refers to the number of monthly active users of websites, apps, etc. after deduplication.

System throughput evaluation:
When we design the system, we need to consider the impact of CPU computing, IO, external system response factors and a preliminary estimate of system performance.

Usually, when we face demand, we evaluate the QPS and concurrency number, and there is another dimension: daily pv.

By observing the access logs of the system, we found that when the number of users is large, the access traffic in the same time period in each time period is almost the same. Like every morning on a working day. As long as we can get the daily traffic map and QPS, we can calculate the daily traffic.

The usual technical method:
find out the highest TPS and daily PV of the system. These two factors have a relatively stable relationship (except for the effects of holidays and seasonal factors)

Through stress testing or empirical estimation, the highest TPS is obtained, and then the relationship of 1 is followed to calculate the highest daily throughput of the system. B2B Chinese and Taobao face different customer groups. The online behaviors of these two customer groups are not applicable, and the ratio of TPS and PV relationships between them is also different.

Basic concepts and calculation formulas of software performance testing

Focus on software performance:
First of all, the purpose of developing software is for users to use it. Let us first analyze from the user's perspective what performance users need to pay attention to.

For users, the time it takes from when they click a button, link, or issue an instruction until the system displays the results in a form that the user perceives is the user's intuitive impression of the software's performance.

That is what we call response time. When the response time is small, the user experience is very good. Of course, the response time of user experience includes personal subjective factors and objective response time. When designing software, we need to consider how to make it better. Combine these two parts to achieve the best user experience.

For example, when a user queries a large amount of data, we can display the extracted data to the user and continue data retrieval while the user is watching. At this time, the user does not know what we are doing in the background.

What users focus on is the corresponding time of user operations.

Secondly, we consider the performance points that need attention from the administrator's perspective.
1. Response time
2. Whether the usage of server resources is reasonable
3. Whether the usage of application server and database resources is reasonable 4. Whether
the system can be expanded
5. How many users can the system support at most, and what is the maximum business processing volume of the system
6. System performance possibilities Where are the existing bottlenecks
? 7. Which equipment can be replaced to improve performance
? 8. Can the system support 7×24 hours of business access?

Again, consider it from the perspective of a developer (designer).
1. Is the architecture design reasonable?
2. Is the database design reasonable?
3. Does the code have performance problems? 4. Is
there any unreasonable memory usage in the system? 5. Is there an unreasonable thread synchronization method in the system ? 6. Is
there any unreasonable thread synchronization method in the system?
There is unreasonable competition for resources

The following is the most comprehensive software testing engineer learning knowledge architecture system diagram in 2023 that I compiled.

1. Python programming from entry to proficiency

Please add image description

2. Practical implementation of interface automation projects

Please add image description

3. Web automation project actual combat

Please add image description

4. Practical implementation of App automation project

Please add image description

5. Resumes of first-tier manufacturers

Please add image description

6. Test and develop DevOps system

Please add image description

7. Commonly used automated testing tools

Please add image description

8. JMeter performance test

Please add image description

9. Summary (little surprise at the end)

Perseverance, pursuit of dreams, and struggle are the power to achieve goals. Move forward bravely, surpass your limits, and create a brilliant life through hard work. Believe in your own abilities, accept challenges, and as long as you continue to work hard, you can create your own magnificent voyage and open up endless possibilities!

Believe in your own strength, move forward courageously, and struggle are the driving forces to chase your dreams. Persevere, surpass yourself, and use your efforts to compose a magnificent movement in life. Embrace challenges and forge ahead. Only through struggle can you create your own glorious legend and light up the dazzling starry sky of life!

Embrace your dreams and embark on the journey. Struggle is the driving force towards success. Move forward bravely, surpass your limits, and use your sweat to create brilliant achievements. Believe in your self-worth and face challenges. Only by unremitting struggle can you create a bright life and blossom into endless possibilities!

Guess you like

Origin blog.csdn.net/m0_60054525/article/details/131982113