Siriuss
Siriuss

Reputation: 51

Customize JMeter Dashboard

We are now using Apache JMeter 3.1 and are very interested in the new feature Dashboard generation. We could generate it with "-g" options and it works fine.

But we are also interested to customize the dashboard. For example :

I would appreciate your help in finding any procedure to customize the dashboard template.

Best Regards.

Upvotes: 3

Views: 7477

Answers (6)

Ritesh Kumar
Ritesh Kumar

Reputation: 11

I'm using apache-jmeter-5.6.2, MAC OS 14.0 (23A344)

Not able to generate customs graphs, its blank. pls refer the screesnhots. Help to guide the steps enter image description here

Sample user.properties file

Custom graph definition

#jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer #jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title #jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms) #jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time #jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity} #jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName #jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label

Upvotes: 0

Sandeep Lohar
Sandeep Lohar

Reputation: 39

Thank you very very much "Thelesserknowngiant". Your recommendation of updating class="panel panel-default" style="display:none, for APDEX section.

Saved my lot of time and efforts.

APDEX table having long list of requests used to take too much time and frustrates me to navigate up to statistics table to view my most useful results.

Many thanks again.

Upvotes: 0

Alan Kelly
Alan Kelly

Reputation: 41

If you want to customise what graphs are displayed in the Dashboard report, you can simply edit the .fmkr files in the ../jmeter/CURRENT/bin/report-template/content/pages/ directory. For example if you want to remove the "Connect Time Over Time" graph which is displayed on the "Over Time" page, you edit the OverTime.html.fmkr file and delete the following 4 lines:

<li>
    <a href="OverTime.html#connectTimeOverTime" onclick="$('#bodyConnectTimeOverTime').collapse('show');">
        Connect Time Over Time
    </a>
</li>

Upvotes: 1

Saroj Purbey
Saroj Purbey

Reputation: 280

It is possible to change the time format(in seconds) in jmeter html report by modifying the javascript file. The steps are:

Locate the file dashboard.js.fmkr in bin\report-template\content\js. Open the file and locate the line "//Create statistics table. In this method, you will see a switch case which corresponds to the columns in statistics table of html report. For example, case 3 is for "Error %" column, case 4 is for "Average" column and so on."

To change the "Average" column's time to seconds, modify the code as follows:

case 4:
item = (item/1000).toFixed(2);
break;

You can repeat this step for any other column.

Upvotes: 1

Thelesserknowngiant
Thelesserknowngiant

Reputation: 181

Out of the box, the customization is fairly limited, however it is very easy to hide unwanted elements.

If you open the template files in /bin/report-template/ you will see there are standard HTML files which you can edit. To hide elements like the APDEX table, edit index.html.fmkr and find the relevant part of the page via the class="dashboard-title" tag, and then simply change the style settings of that panel to:

class="panel panel-default" style="display:none;"

In the background the work will still be done to generate the information, however it won't display when you open up your report HTML file. This should achieve the result you want.

This can be used to hide any unwanted elements, however if you try to move around elements, such as moving graphs to the front page via editing the template files, it's currently very fragile so generally doesn't work.

Upvotes: 2

Naveen Kumar R B
Naveen Kumar R B

Reputation: 6398

There is NO way to achieve your goals in the latest version of JMeter (as of now, 3.1). You can configure properties of the graphs but you really can't exclude them from generating especially the way you want.


If you don't want to generate the graphs, then there is one way (but not as you are expecting), don't include graph properties in report.properties file as JMeter depends on this configuration to generate graphs.

Due to limitations of this early version, each default graph must be declared in JMeter properties. Otherwise, the graph views will be empty.

for example,

to avoid generating the graph for BytesThroughputGraphConsumer, remove the following 3 lines corresponding to these graph from report.properties file and generate the report.

# Bytes Throughput Over Time graph definition
jmeter.reportgenerator.graph.bytesThroughputOverTime.classname=org.apache.jmeter.report.processor.graph.impl.BytesThroughputGraphConsumer
jmeter.reportgenerator.graph.bytesThroughputOverTime.title=Bytes Throughput Over Time
jmeter.reportgenerator.graph.bytesThroughputOverTime.property.set_granularity=${jmeter.reportgenerator.overall_granularity}

same way, delete the 3 lines of respective graphs that you don't want to generate.

Note: this makes JMeter to not generate the graph, but still you can see the title in Dashboard report, but in graph place, it will be empty

Reference:

http://jmeter.apache.org/usermanual/generating-dashboard.html


Another way is edit the HTML report (remove the HTML code for the graphs and unnecessary things that you dont need)

Upvotes: 1

Related Questions