Updated February 14, 2023
Introduction to JMeter Throughput
The following article provides an outline for JMeter Throughput. We know that JMeter is an open-source, free tool used to conduct load and performance testing on static and dynamic web applications. As a result, it provides a different terminology to understand the application’s performance, the throughput of the terminology used to determine the request time, or we can say that it calculates the start time of the thread to the end time of the thread. In addition, it contains the interval between the threads.
Key Takeaways
- Throughput provides control over the load throughout the testing.
- With the help of constant throughput, we can maintain the throughput of our server as per our requirements.
- This is an essential component of performance testing to identify the performance of an application.
- It allows us to test the number of requests per minute.
What is JMeter Throughput?
Throughput is viewed as one of the most confounding presentation testing-related terms. Individuals frequently battle to comprehend this term, and many overlook it. Performance testing is a sort of non-practical testing planned to decide the responsiveness, throughput, dependability, and versatility of a framework under a given responsibility. Throughput is the number of units of work that can be taken care of per unit of time; for example, several solicitations each second (RPS), calls each day, hits each second, reports each year, and so on.
All in all, what is throughput? According to the documentation, throughput is demand/unit of time. The estimation of time starts from the outset of the principal test to the furthest limit of the remaining one. Fundamentally, it is how many exchanges occurred over the test span. Deciding the limit of the application under test is additionally utilized. The server’s capacity depends on how much burden it can take. The execution testing is to accomplish the most significant level of throughput.
How to Use Constant Throughput in JMeter?
Let’s see how we can use constant throughput in JMeter as follows:
With the help of constant throughput, we can keep constant time. If our server is not able to handle this type of load, then the throughput is lower. Throughput might diminish, assuming different clocks go against the Constant Throughput clock. Albeit the Timer is known as the Constant Throughput clock, the throughput esteem needn’t bother with being consistent. This worth can be changed during a test.
First, we need to create the thread group inside the Test plan, so first, we need to right-click on the Test Plan, then move the mouse on Add-> Threads and select the Thread Groups as shown in the below screenshot.
In the above screenshot, we can see the different options, so as per our requirement, we can change; here, we set the number of threads as 100, and the Ramp up period is 1 second, as shown in the screenshot.
In the next step, we need to add the sampler to test the web application with the GET method, so right-click on Thread Group, over the mouse on ADD, then the sampler, and select HTTP request. In this example, we set HTTP requests as shown in the below screenshot.
Now we need to add the listener to see the result, so we can use any Listener that we want; here, we added a graph listener, as shown below screenshot.
After that, we need to add the constant throughput timer, so first, we need to right-click on sample-> select Timer, and inside we need to click on Constant Throughput Timer and set the constant throughput timer as per our requirement.
JMeter Throughput Timer Element Working
Changing this consistent worth during the test is additionally accessible. You can utilize a counterfactor or a capability with JavaScript or BeanShell. It is all dependent upon you. Another significant thing is the number of strings. If this number isn’t sufficient to arrive at your normal throughput esteem, the real worth might be lower, which can hurt your testing exertion. As this clock works with brief recurrence, you should be cautious about your increase period. A more drawn-out increase period might prompt lower throughput esteem.
“Work out Throughput in light of” significant worth is additionally vital. Your normal and real throughput values might vary if you don’t make a wise decision. Even though you can control the utilization of this component by the value above, where to put this component is likewise vital. Utilizing different Constant Throughput Timer components brings about disarray for your test script. So please make an effort not to use several of them.
Examples of JMeter Throughput
Let’s see examples of constant throughput timers as follows:
First, we need to create a Test Plan; inside the test plan, we need to add Threads as per our requirement-> Inside the threat,d add a sampler and listener to see results,s but here, we need one more element,t which is Timer with Constant Through Timer as shown in below screenshot.
Here we need to set the Target throughput timer and the calculation based on the option shown in the screenshot below.
Now execute the test plan and see the result in the listener, as shown in the below screenshot.
FAQ
Other FAQs are mentioned below:
Q1. Why do we use a constant throughput timer in JMeter?
Answer:
Using this element, we can keep a constant timer, but sometimes bottleneck or any problem may occur, and our throughput will be low.
Q2. How to control the throughput timer?
Answer:
It helps us to control all the child’s requests.
Q3. How to calculate the throughput timer in JMeter?
Answer:
It uses a simple formula throughput= number of samplers or request/ total time required.
Conclusion
In this article, we saw the different types of JMeter throughput and the uses and features of this JMeter throughput. Another point from the article is how we can perform and set up the throughput in JMeter.
Recommended Articles
This is a guide to JMeter Throughput. Here we discuss the introduction, Timer element working, examples, and how to use constant throughput in JMeter. You may also have a look at the following articles to learn more –