0
votes

I know that jmeter has a listener that generates such a graph like so:

enter image description here

But i want this in a grafana dashboard, i am using the InfluxDbBackendListenerClient and these are my table columns in influxDB:

"columns": [
                 "time",
                 "application",
                 "avg",
                 "count",
                 "countError",
                 "endedT",
                 "hit",
                 "max",
                 "maxAT",
                 "meanAT",
                 "min",
                 "minAT",
                 "pct90.0",
                 "pct95.0",
                 "pct99.0",
                 "rb",
                 "responseCode",
                 "responseMessage",
                 "sb",
                 "startedT",
                 "statut",
                 "transaction"
                ],
1

1 Answers

0
votes

As per Metrics Exposed chapter of the Real-time results Connect Time is not something which is available as per JMeter 5.2.1

You can come up with a custom implementation of the AbstractBackendListenerClient which will collect and send Connect Times.

Alternatively you can substitute a metric you're not interested in, for example Sent Bytes with the Connect Time. It can be done using i.e. JSR223 PostProcessor and the following simple code:

prev.setSentBytes(prev.getConnectTime())

enter image description here

as you can see upon execution Sent Bytes value becomes equal to Connect Time value hence you can plot it in Grafana amending the chart title:

enter image description here

Don't forget to appropriately place the JSR223 PostProcessor according to JMeter Scoping Rules so it would be applied to all the Samplers

In the above example prev stands for SampleResult class instance, see the Javadoc for all available functions/properties.