jmeter timer

First, the scope of the timer

1. The timer is executed before each sampler (sampler), not after (regardless of whether the timer position is before or below the sampler);

2. 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 role of the timer

1. Constant Timer

This timer can be used if you need to make each thread pause for the same specified time before the request; it should be noted that the delay of the fixed timer does not count towards the response time of a single sampler, but does count towards the transaction controller time.

For the "java request" sampler, the timer is equivalent to pacing in loadrunner (the interval between two iterations);

For the "transaction controller", the timer is equivalent to the think time in loadrunner (think time: in actual operation, simulate the waiting time of real users during the operation).

A portal is attached here, which has a more comprehensive explanation of pacing and think time in loadrunner: https://zhidao.baidu.com/question/1431215934913423459.html

The response time we usually say should be for a specific sampler (http request) in most cases, not for a transaction combined with a group of samplers.

2. Gaussian Random Timer

If each thread needs to be paused at a random time before the request, then use this timer. The above figure shows that the pause time will be distributed between 100 and 400. The calculation formula

3. Uniform Random Timer

 

It is not much different from the Gaussian random timer. The difference is that the delay time is within the specified range and the value probability of each time is the same, and each time interval has the same probability of occurrence. The total delay time is the random value and the bias. The sum of the shift values.

The following indicates that the maximum random delay time is 100 milliseconds:

(1) Random Delay Maximum(in milliseconds): The maximum number of milliseconds of random delay time

(2) Constant Delay Offset (in milliseconds): The number of milliseconds to pause minus the number of milliseconds of random delay

 4. Constant Throughput Timer

 

It is possible to have JMeter execute at a specified number of throughputs (that is, specify TPS, but here it is required to specify the number of executions per minute, not per second).

The range of throughput calculation can be specified as the current thread, current thread group, all thread groups, etc., and the basis for calculating throughput can be the execution delay of the latest thread. This kind of timer is still very useful in certain scenarios.

 5. Synchronizing Timer

 

This timer is similar to the rendezvous point in loadrunner. Its function is to block threads until the specified number of threads is reached, and then release them together, which can instantly generate a lot of pressure (many people are more powerful--haha !)

(1) Number of Simulated Users to Group by: The number of simulated users, that is, the number of threads to be released at the same time

(2) Timeout in milliseconds: Timeout time, that is, how many milliseconds after the timeout will release the specified number of threads at the same time

6. BeanShell Timer (BeanShell Timer)

This timer is generally not used, but it can be said to be the most powerful, because it can be turned into anything you want to do, for example: you want to wait after each thread is executed, or you want to Wait for a variable to reach the specified value.

Here is an introduction to BeanShell:

BeanShell is a loosely typed scripting language (similar to JS), a java scripting language that fully conforms to java syntax, and has its own syntax and methods.

Portal (another blogger's blog): http://www.cnblogs.com/jssy/archive/2006/10/23/537101.html

7. Poisson Random Timer

The above indicates that the pause times 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

 Portal (what is a Poisson random number): http://baike.baidu.com/link?url=CJ0_Qtuilzp3a4Xos9N7V_hFQjaf_zb_aM1wggqxIYGDGWjtKsp6JSjRIQ110lE38sQOKYcgNUMjRuMAPGb3xK

8. JSR223 Timer (JSR223 Timer)

In the latest version of jemter, this timer has been added. It can be understood that this timer is equivalent to the "parent set" of the BeanShell timer. It can use java, JavaScript, beanshell and other languages ​​to achieve what you want to accomplish matter;

We all know that jemter is an open source pure java tool that can build various components and jar packages by itself to complete various things.

Portal (about JSR223): http://wenku.baidu.com/link?url=GUFnww9nb_1D6MlFd1YksYrNVk1NXF74ov8kJL06MmqVdmH_Q9v4YnWK-_gZ-04zL4QEqD9VN48OrXi4JyXpxosNZd8LBfIWhyhhxgUbrAC

9. BSF Timer (BSF Timer)

 

BSF Timer is also a new timer in the new version of jmeter. Its usage method is very similar to that of JSR223 Timer. You only need to import its jar package in the lib folder of jmeter to support scripting language to directly access Java objects and methods. timer.

With it, you can use javascript, Python, XSLT, Perl, tcl, ... a lot of scripting languages ​​in java application. And vice versa;

It is to call any registered JavaBean, java object in these scripting languages. It provides a complete API implementation to access the scripting language engine via Java.

Since I don't have a deep understanding of java, I can only briefly describe its function and deficiencies by consulting relevant information. I hope to correct it.

Portal (BSF): http://baike.baidu.com/link?url=0RRkO1WqT1SdaXIzohqnEU8lcilpc_Sqwy7HtfpzCdCX1kyyLC5qttpF8jayTWFZi_tCbFbzMEw8FxHFYnIGYK

 

Guess you like

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