Performance Test Report (Getting Started)

JMeter script recording

  1. Create Group

a. Number of Threads (users): Simulate multiple users through multiple threads
b. Ramp-Up period (in seconds): Used to tell JMeter how long to establish all threads. The default value is 0. If ramp-up period is not specified, that is, ramp-up period is zero, JMeter will immediately establish all threads. Assuming that ramp-up period is set to T seconds and all threads are set to N, JMeter will set every T / N Create a thread in seconds.
Ramp-up period settings are prone to problems:

(a). If it is set to zero, Jmeter will establish all threads at the beginning of the test and immediately send access requests, so that it is easy to saturate the server, and more importantly, it will increase the load implicitly, which It means that the server may be overloaded, not because of the abnormal high initial access rate but because of the abnormal initial access peak caused by the first concurrent access of all threads. This anomaly is not what we need, so the rule for determining a reasonable ramp-up period is to make the initial click-through rate close to the average click-through rate. Of course, you may need to run some tests to determine reasonable traffic. If you want to use a large number of threads, ramp-up period should not be set to zero.

(b). If the ramp-up period is too large, it is also inappropriate, because it will reduce the load of the peak access. In other words, when some threads have not been started, some of the threads started at the beginning may have ended.

©. A reasonable ramp-up period, first guess the average click-through rate and divide the click-through rate by the total threads to calculate the initial ramp-up period.
For example, if the number of threads is 100 and the estimated click rate is 10 times per second, then the estimated ideal ramp-up period is 100/10 = 10 seconds.
psb

  1. Create a loop controller

Used here to generate variable parameters.
a. Loop Count: the number of times each thread is executed The
current total number of samples = Loop Count (Loop Controler) Number of Threads Loop Count (group) = 2 100 500
psb (1)

  1. Define variable parameters

a. Filename: parameter file name

b. Variable Names: Variable names correspond to the following custom variables

c. Delimiter: parameter separator in the parameter file

Note: Theoretically, the number of parameters in the file should not be less than Loop Count * Number of Threads
psb (2)

  1. Define request parameters

  2. Execute script

Upload the script file (.jmx) and parameter file (.csv) to the server. If the path of the parameter file is not specified, put the two files under the same path.

a. The command is: sh jmeter.sh -n -t examples / 41search_1.jmx -l examples / search_1_100T.jtl.
You can view the help for other command parameters.

  1. View Results

Export the generated result file (search_1_100T.jtl) to this, open it with JMeter to view

a. Aggregate report

b. Graphical report

c. Tree report

Aggregate report

It's a bit familiar with the aggregation report. Yes, you are not mistaken. The results of him and Apache AB are similar. In fact, LoadRunner will also have such a similar data.
Let's talk separatelyThe meaning of each data, The ones marked in red require special attention.

  1. #Samples: The number of samples, if you have read the previous article, this is the result calculated by our previous formula
    (Loop Count (Loop Controler) Number of Threads Loop Count (group))
  2. Average: Average response time.
  3. Median: Median, 50% user response time.
  4. % 90 Line: 90% user response time.
  5. Min: minimum response time.
  6. Max: Maximum response time.
  7. Error%: the number of requests with errors / total number of requests in this test
  8. Throughput: Throughput, indicating the number of requests completed per second.
  9. KB / Sec: The amount of data received from the server per second (only received).

Here are some key parameters:

1. Why is% 90 Line important?
Here is a chestnut: What can Yao Ming and Guo Jingming mean about 1.84 meters tall? If this example is not good enough, think about my average salary in Datian Dynasty. So average does not mean fairness, because there are always a handful of people that will greatly affect the average, and most people are averaged.

Through the JMeter official website we can find the definition of this parameter (http://jmeter.apache.org/usermanual/glossary.html):
90% Line (90 th Percentile) is the value below which 90% of the samples fall. The remaining samples too at least as long as the value. This is a standard statistical measure. See, for example: Percentile entry at Wikipedia.

It seems that this paragraph is unclear, but he reminded me of the important word Percentile, so we continue to follow up, it turns out that this is a statistical term. There is a detailed description on the wiki, and there is a formula: n = (100 / P) * N + 1/2
where n = sort bit; P = value to be sorted; N = total number of sorted values

This piece is a bit round, and it will be clearer to see the example on the wiki (http://en.wikipedia.org/wiki/Percentile).
To put it bluntly, it is to sort a set of data from largest to smallest and calculate the corresponding cumulative percentile, then the value of the data corresponding to a certain percentile is called the percentile of this percentile.

2. I
don't talk about Error% , everyone knows it.

3.Throughput

This is another very important parameter. The PV calculation mentioned at the beginning is related to this number.
The calculation formula is shown in the figure below. PV can be converted through Throughput. Of course, a certain buffer must be reserved in order to cope with emergencies.
So now back to the question at the beginning, theoretically 231 transactions per second can be (10000000 0.8) / (24 60 60 0.4), of course, this is only theoretical ;-)
psb

4. KB / Sec is
not detailed here, it is related to calculating the bandwidth of your computer room.

Graphical results

The more important parameter here is the amount of deviation.
The amount of deviation is theoretically the smaller the system is stable. But how much is it small? Therefore, this statement is inaccurate. "The bacterium doesn't know the dark side, and the mole cricket doesn't know the spring and autumn." The definition of the standard is different in different scenarios.

Because I don't quite understand the normal distribution and confidence intervals, I dare not talk nonsense here.

Published 1 original article · Liked 0 · Visits 3

Guess you like

Origin blog.csdn.net/qq_45481507/article/details/105629168