Jmeter--Timer sets the waiting time

1. The concept of Jmeter timer:
1) The timer is executed before each sampler (sampler), not after;
yes, you read it right, no matter the position of the timer is placed after the sampler, or , it all gets executed before sampler.
2) Timers are scoped; before executing a sampler, all timers in the current scope will be executed;
3) If you want the timer to apply to only one of the samplers, add the timer as a child node ;
4) If you want to wait after the sampler is executed, you can use Test Action;

 

Second, the application of the timer in Jmeter

1. In normal performance testing, after obtaining important performance index values ​​in each request, a waiting time needs to be set in each request, which is closer to the request of the server's real environment.
2. These two methods of setting waiting time are more commonly used:
(1) Gaussian Random Timer obeys Gaussian distribution, and the waiting time is more in line with
(2) Poisson Random Timer serves Passon distribution

 

First User Defined Variables defines the required parameters, as follows:

How to use: Use ${ip}, ${port} instead in the corresponding position where parameters need to be used.
Application scenario: When the test environment changes, we only need to modify the ip and port in one place, and the script can be applied to the test of another environment immediately, without modifying the script one by one.

The parameters set above are applied in the following interfaces as follows:

 Configure the waiting time parameters of each interface, and set the waiting time for all requests

There are several common ways to configure the waiting time:

(1) Constant Timer

When the Constant Timer is placed between two http requests, the meaning it represents is: after the previous request is sent to the completion, start the time specified by the Constant Timer, and finally send the second request. It does not represent two requests. The interval between sending. This is the most important timer.
   Note : The delay of the fixed timer does not count towards the response time of a single java sampler, but does count towards the transaction controller's time.

(2) Gaussian Random Timer

The delay time of the timer is normally distributed within the specified range. If you need each thread to pause at a random time before the request, then use this timer, the following figure shows that the pause time will be distributed between 100 and 400

(3) Poisson Random Timer

This timer is paused at random times before each thread request, most of the time interval occurs at a specific value, and the total delay is the sum of the Poisson distribution value and the offset value.
The following means that the pause time will be distributed between 100 and 400 milliseconds:
1) Lambda (in milliseconds): Lambda value
2) Constant Delay Offset (in milliseconds): The number of milliseconds to pause minus the number of milliseconds of random delay

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325282409&siteId=291194637