Introduction to Software Testing--basic knowledge of software testing (vii)

Source: Internet
Author: User

    • Test Performance Model Analysis

1. Curve inflection point model

The x-axis of this graph is the number of concurrent users, and as the number of concurrent users increases, the two-dimensional space is divided into three regions: Light pressure area, heavy pressure area and inflection point area.

The y-axis represents resource utilization, throughput, and response time, and the changes of these three indicators should be analyzed by x as an independent variable, and then analyzed comprehensively.

① with the increase of the number of concurrent users, the resource utilization increases gradually and finally reaches saturation.

② throughput increases as the number of concurrent users increases. After entering the heavy pressure area, the gradual steady, reached the inflection point area after a sharp decline, indicating that the system has reached the processing limit.

③ with the increase of the number of concurrent users, the response time in the light pressure zone changes little, relatively gentle, into the heavy pressure area after the trend of growth, and finally into the inflection point area after the increase in the tilt rate, response time increased sharply.

As the number of concurrent users increases, resource utilization and throughput increase, the system is actively processing, so the response time is not significantly increased, in a better state. But as the number of concurrent users increases, the pressure continues to increase, throughput and resource utilization are saturated, and throughput drops sharply, resulting in a dramatic increase in response time. The junction point of the light pressure zone and the heavy pressure zone is the optimal number of concurrent users of the system, because the resources are fully utilized and the response is very quick, while the junction of the heavy pressure zone and the inflection point is the maximum number of concurrent users of the system, because exceeding this point, the system performance will drop sharply or even collapse.

2. Metro Model Analysis

Simulate the scene of a subway to analyze performance.

Make the following 3 assumptions first

    1. There are only 3 card machines in a subway station.
    2. In the case of fewer people, the passengers can come in quickly, assuming that the pit stops only need 1s
    3. Passengers who wait for more than 30min will be angry, nagging and even give up (how to feel a little bit like a small game of the restaurant when playing, wow haha ~)

There are 3 scenarios initially:

    1. Only 1 passengers in the station, can be completed in 1s, and only the use of a swipe machine, the remaining two waiting.
    2. Only 2 passengers in the station, can be completed in 1s, and only the use of two swipe machines, the remaining one waiting.
    3. Only 3 passengers were in the pit and could still be completed within 1s, when the resources were fully utilized.

Then a new scene appears:

    1. Came 6 passengers, because a, B, C first arrived, so D, E, F to wait for the first line, this time the pit stop is 2s. (Equivalent to "response time" growth)
    2. 9 passengers, 3 of them "response time" is 1s, 3 "response time" is 2s (pit 1s+ wait 1s), and 3 "response time" is 3s (pit 1s+ wait 2s)
    3. For 10 passengers, there must be 1 "response time" of 4s, and so on, with the influx of people, will reach the endurance limit of passengers.
    4. Suppose the subway station is just at the railway station, each passenger is holding a bag of different sizes, some because the bag is too big kcal in the card machine that caused the blockage, the pit stop time is not the same.

Then, if the bag of passengers can be quickly through the widening of the card machine to stop, it can improve the problem of clogging. If the passenger more and more, 3 card machine has been unable to meet the demand, then in order to reduce the backlog of people, you can open a few more card machine, increase the number of people and speed of the pit stop (increase TPS, increase connection).

There are also 1 big bosses:

    1. At rush hour, the number of passengers is rising too fast, the existing pit stop is not enough, just increase the card machine has gone. At this time the passenger is the equivalent of a "request", the passenger is not in the subway station in line, or on the platform waiting for the bus, has caused serious "blockage."

At this point, increase the frequency (speed up the application, the processing capacity of the database), increase the number of carriages (increase memory, increase throughput), increase the line (increase the service thread), current limit, shunt and other measures should be born.

Introduction to Software Testing--basic knowledge of software testing (vii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.