2 Minutes To Code (β Version)

JMeter - 2 minute tutorial

Example of Constant Throughput Timer (sample usage)

Constant Throughput Timer will introduce random delays between requests in such a way that a load/stress of required throughput is sent to teh application. Let's see an example of Constant Throughput Timer in use.

The thread group used has a loop count of 3, no. of threads is 5 and 1 HTTP sampler called 'Home Request' is used. We will add a Constant Throughput Timer to our Test Plan (Image 1). This timer will be set to use a throughput of 60.0 requests per minute and the throughput will be calculated based on all active threads in current thread group option( Image 2).

Now, Image 3 shows the result when the constant throughput timer was not used. Notice, that all requests get fired in quick succession without any delays between consecutive request of same thread.

However, the story is different with Image 4 where Constant Throughput Timer is in action. Notice that consecutive requests by same thread (follow the Thread Name column of results table) have a delay of around 5 seconds. This random delay was based on JMeter's own calculation to ensure the required throughput. (cross-checking : 5 requests in 5 seconds will get us to 60 requests in 60 seconds i.e. 60 requets per minute).

Image 1: Adding Constant Throughput Timer

Image 2: Configuring Constant Throughput Timer for 60 requests per minute

Image 3: Result without Constant Throughput Timer

Image 4: Result with Constant Throughput Timer