Search code examples
jmeterinfluxdbgrafana

How to get throughput( in influx db) of each sampler i have in jmeter test


I want to plot the graphs of throughput/unit time in grafana using influx db of each samplers i have in my jmeter test.I can get the overall throughput of a test/unit time (using additional tables delta and total in influx db).

Can somebody help me to get this done.

Or is there any way to get sampler wise throughput in influx db in the same way as we get count of sample zz “jmeter.zz.a.count".May be by using user.properties/jmeter.properties.

Any kind of help in this appreciable.


Solution

  • Jmeter backend listener, by default, will not poll sampler results to influx. To start with, you need to mark summaryOnly to "false" as shown below: backend listener config

    And then, you can make use of a modified jar file (you can search for this on testautomationguru(dot)com. There is a modified jar file you can download and replace in this lib/ext folder. This modified jar will allow the backend listener to write the sampler metrics directly into influx. These are the same metrics that you will see in your command line metrics from cli

    Once you have the jar replaced in lib/ext, you need to pass in the influx details via cli or update them in user.properties files

    user.properties

    Now, if you go into your influx DB, and enter the query "select * from samples", you should see metrics like below

    influx db query

    Now go to grafana and graph it

    Grafana sample