- Author: [[perftuned.com]]
- Full Title: Generating Custom Chart in JMeter - PerfTuned
- URL: http://www.perftuned.com/jmeter-generating-custom-charts/
## Highlights first synced by [[Readwise]] [[2020-12-08]]
- Name of the variable that you want to have on a graph needs to be specified as a so-called sample variable.
To do that just add a line like below, containing your variable to the JMeter’s properties file, e.g. user.properties or jmeter.properties. In my case I’ve added multiple sample variables:
sample_variables=QueueLength,DummyVariable
Very important thing! It needs to be done before the test ([View Highlight](https://instapaper.com/read/1368030244/14806614))
- Now you need to provide a simple definition of your chart containing:
name of the chart (QueueLengthGraph in the example below)
title of the chart
description of the X and Y axis
granularity (can be left as defined globally for the dashboard)
and finally name of the variable that should be plotted
# Queue length graph
jmeter.reportgenerator.graph.custom_QueueLengthGraph.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer
jmeter.reportgenerator.graph.custom_QueueLengthGraph.title=Number of messages in the queue over time
jmeter.reportgenerator.graph.custom_QueueLengthGraph.property.set_Y_Axis=Queue length
jmeter.reportgenerator.graph.custom_QueueLengthGraph.property.set_X_Axis=Test duration
jmeter.reportgenerator.graph.custom_QueueLengthGraph.property.set_granularity=${jmeter.reportgenerator.overall_granularity}
jmeter.reportgenerator.graph.custom_QueueLengthGraph.property.set_Sample_Variable_Name=QueueLength
Again, you can put it in one of the JMeter’s properties files e.g user.properties, reportgenerator.properties or other. ([View Highlight](https://instapaper.com/read/1368030244/14806618))