Calculating the throughput (requests/sec) and plot it

4k views Asked by At

I'm using JMeter client to test the throughtput of a certain workload (PHP+MySQL, 1 page) on a certain server. Basically I'm doing a "capacity test" with an increasing number of threads over the time.

I installed the "Statistical Aggregate Report" JMeter plugin and this was the result (ignore the "Response time" line): enter image description here

At the same time I used the "Simple Data Writer" listener to write a log file ("JMeter.csv"). Then I tried to "manually" calculate the throughput for every second of the test.

Each line of "JMeter.csv" has this format:

timestamp       elaspedtime   responsecode   success   bytes
1385731020607   42            200            true      325
...             ...           ...            ...       ...

The timestamp is referred to the time when the request is made by the client, and not when the request is served by the server. So I simply did: totaltime = timestamp + elapsedtime.

In the next step I converted the totaltime to a date format, like: 13:17:01.

I have more than 14K samples and with Excel I was able to do this quickly.

Then I counted how many samples there were for each second. Example:

totaltime    samples (requestsServed/second)
13:17:01     204    
13:17:02     297
...          ...

When I tried to plot the results I obtained the following graphic: enter image description here

As you can notice it is far different from the first graphic.

Given that the first graphic is correct, what is the mistake of my formula/procedure to calculate the throughput?

2

There are 2 answers

0
HBv6 On BEST ANSWER

It turns out that this plugin is plotting something that I don't know... I tried many times and my considerations were actually correct. Be careful with this plugin (or check its source code).

0
Rajesh Om On

Throughput can be view in Jmeter Summary Report and you can calculate by saving your Test Results file in xml file in Summary Report.

Throughput = Number of samples/(Max (ts+t) - Min ts)*1000
Throughput = (Number of samples/The difference between Maximum and minimum response time)*1000

By this formula you can calculate Throughput for each and every http requests in Summary Report.

Example:

Max Response Time = 1485538701633+569 = 1485538702202
Min Response Time = 1485538143112

Throughput = (2/1485538702202-1485538143112)*1000
Throughput = (2/1505) *1000
Throughput = 0.00132890*1000
Throughput = 1.3/sec

You can read more with examples Here(http://www.wikishown.com/how-to-calculate-throughput-in-jmeter/), i got a good idea about Throughput Calculation.