Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Jmeter fixed timer

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to use Jmeter fixed timer". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use Jmeter fixed timer.

The thread group using Jmeter of Jmeter's fixed timer can use a fixed timer when it needs to set a waiting time between two requests.

Special illustration of scene examples

When the thread group of Jmeter needs to set a wait time between two requests, it can be solved with a fixed timer. Scene example

Send two http requests sequentially, and after the first http request is sent, you need to add a waiting time before sending the second http request.

Configuration mode, as shown in the figure, add-"timer -" fixed timer to the second request

Configure timer wait time

You need to control the sequential execution of two http requests and add-"logical controller -" critical area controller (Critical Section Controller) to the thread group.

The execution effect is as follows

You can see that after http request 1 was sent, wait 3 minutes before sending http2.

Special instructions

A fixed timer needs to be added to the http request that requires a waiting time before sending to achieve the purpose of waiting for a fixed time to send the specified http request.

If the fixed timer is directly configured under the thread group, no matter where it is placed, the execution effect is to execute the fixed timer first. Before executing the http request, as shown in the following figure, the execution effect is that each http request waits for a fixed time before it is sent.

Supplement: unified random timer

Unified random timing means that the delay time between each interface is random in a certain interval, and the probability of random value in the interval is equal. It is composed of maximum random time + fixed delay time!

Add timer-> Unified Random timer

Set the fixed delay time to 2s and the maximum random time to 1s:

Above we can see that the delay time is between 2s-3s!

Accurate throughput timer

This is the one that controls throughput. The exact throughput timer is based on the throughput (the request is sent as soon as the quantity is reached). That is, you can control the speed and number of requests.

Add timer-> accurate throughput timer

Set the number of threads in the thread group:

Set the throughput timer data:

Add two interface requests, and then run the interface to get the following:

The startup thread has been running for about 20 seconds, if we modify the timer configuration:

Ten threads are processed simultaneously as a group:

At run time, we can see that 10 threads are processed at once, and then run for about 10 seconds!

Constant throughput timer

This timer introduces variable pauses to calculate the total throughput as close as possible to a given number. Of course, if the server cannot handle it, or if other timers or time-consuming test originals block it, the throughput will be even lower.

Add timer-> constant Throughput timer

Set the target throughput to 300/min:

The results can be viewed by the jp@gc-Transactions per Second plug-in and will not be demonstrated here.

Thank you for your reading, the above is the content of "how to use Jmeter fixed timer". After the study of this article, I believe you have a deeper understanding of how to use Jmeter fixed timer, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report