Tossa Darex
Tossa Darex

Reputation: 29

Confusion with transaction per second calculation

I am very confused with the calculation of transaction per second . Suppose that my jmeter log file look like this :

timeStamp;elapsed;label;responseCode;threadName;success;bytes;grpThreads;allThreads;Latency;SampleCount;ErrorCount;Hostname;IdleTime
10:24:10;302;10.107.25.219;200;Groupe d'unités 1-1;true;266;1;1;302;1;0;MYPC;0
10:24:11;182;10.107.25.219;200;Groupe d'unités 1-1;true;266;1;1;181;1;0;MYPC;0
10:24:12;153;10.107.25.219;200;Groupe d'unités 1-1;true;266;1;1;153;1;0;MYPC;0
10:24:13;198;10.107.25.219;200;Groupe d'unités 1-1;true;266;1;1;198;1;0;MYPC;0

How can I calculate transaction per second?

Is it a constant??

Upvotes: 2

Views: 3927

Answers (1)

Naveen Kumar R B
Naveen Kumar R B

Reputation: 6398

You can use JMeter plugin Transactions Per Second listener.

  1. Download the plugin jar, keep in /lib/ext folder of JMeter and RESTART. Or use JMeter Plugin Manager to download jar from the tool itself.
  2. Add the jp@gc Transactions Per Second graph from the Listener menu, to your Test Plan.
  3. Load the results file using Browse button.
  4. You can filter only transactions by disabling all the checkboxes related to HTTP samplers and enabling Transaction Controller checkboxes from Rows tab.

If you want to build custom reporter:

First Solution:

you can depend on datatype column in the result to differentiate a sampler and a transaction controller in the results file.

Following is the sample results file with one sampler and one transaction controller:

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,grpThreads,allThreads,Latency,IdleTime
1480588968698,3,HTTP Request,200,OK,Thread Group 1-1,text,true,,434,1,1,2,0
1480588968697,3,Transaction Controller,200,"Number of samples in transaction : 1, number of failing samples : 0",Thread Group 1-1,,true,,434,1,1,2,2
1480588968702,0,Debug Sampler,200,OK,Thread Group 1-1,text,true,,421,1,1,0,0

you can check that datatype column is empty for the transaction controller where as for the sampler, it is text.

If you are writing your own custom report generator, you can use datatype column, in your decision making.

Second Solution:

by following naming standards, you can achieve the same thing in more professional way.

  1. Name all your samplers starting with "Sampler_"
  2. Name all your samplers starting with "Transaction_"

that's it. In your code, you have the control to decide which label value indicates what i.e., either sampler/transaction controller.

Upvotes: 1

Related Questions