Bug 62166

Summary: Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard
Product: JMeter - Now in Github Reporter: Shayan <shayansadullah>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: p.mouawad, support
Priority: P2 Keywords: FixedInTrunk
Version: 4.0   
Target Milestone: JMETER_5.0   
Hardware: All   
OS: All   
Attachments: Patch implementing feature
Screenshot showing how custom graphs are rendered

Description Shayan 2018-03-08 21:19:17 UTC
Hi there,

The dashboard that is generated via JMeter - When the PerfMon Metrics collector writes to the JTL file with CPU information, it presents response times (ms) in the Statistics section. 

However, I would like to see 

(a) The CPU Usage as a % (like you can see in the Chart display for PerfMon) presented in the dashboard Statistics section. 

(b) The Charts section in the Dashboard to be exactly the same as you see for the PerfMon Listener GUI ie Y axis as the percentage CPU and the X axis as the duration taken to complete the Test Plan.

I am new to JMeter and my company is very interested in JMeter and they are very eager to see the CPU Usage figures and charts presented on the existing Dashboard. 

Many Thanks,

Shayan.
Comment 1 Philippe Mouawad 2018-03-08 21:23:56 UTC
Hello,
What would be possible with development is to offer the ability to add custom graphs.

But this would require some work.
Comment 2 Shayan 2018-03-08 21:36:00 UTC
Hi Phillipe,

Thanks for getting back so quickly!

Would it be a lot of work just to present it as figures in the Statistics section as a separate table eg Max | Min | Average CPU over the duration of the entire test.

If the graph itself was not available for now, would it be possible to generate the above data?

Wen are a C# .NET organisation and I'm in QA so don't really know much about the Java stack! 

Many thanks,

Shayan.
Comment 3 UbikLoadPack support 2018-06-25 21:01:58 UTC
Created attachment 35986 [details]
Patch implementing feature

Hello,

UbikLoadPack Team is happy to contribute this enhancement to Apache JMeter
developed by Thomas, Anthony and Philippe and sponsored by Ubik-Ingenierie.

We are happy to donate this code to Apache JMeter as we have already donated
other piece of code in the past under our signed CCLA.

Regards
UbikLoadPack Team
@ubikloadpack
https://ubikloadpack.com
Comment 4 UbikLoadPack support 2018-06-25 21:09:20 UTC
Created attachment 35987 [details]
Screenshot showing how custom graphs are rendered
Comment 5 Philippe Mouawad 2018-06-26 07:32:10 UTC
Author: pmouawad
Date: Tue Jun 26 07:30:08 2018
New Revision: 1834399

URL: http://svn.apache.org/viewvc?rev=1834399&view=rev
Log:
Bug 62166 - Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard

Contributed by UbikLoadPack
Bugzilla Id: 62166

Added:
    jmeter/trunk/bin/report-template/content/js/customGraph.js.fmkr
    jmeter/trunk/bin/report-template/content/js/dashboard-commons.js.fmkr
    jmeter/trunk/bin/report-template/content/pages/CustomsGraphs.html.fmkr
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java   (with props)
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseCustomGraphGraphConsumer.java   (with props)
    jmeter/trunk/test/src/org/apache/jmeter/report/processor/graph/
    jmeter/trunk/test/src/org/apache/jmeter/report/processor/graph/impl/
    jmeter/trunk/test/src/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java   (with props)
Removed:
    jmeter/trunk/bin/report-template/content/js/dashboard-commons.js
Modified:
    jmeter/trunk/bin/report-template/content/js/graph.js.fmkr
    jmeter/trunk/bin/report-template/content/pages/OverTime.html.fmkr
    jmeter/trunk/bin/report-template/content/pages/ResponseTimes.html.fmkr
    jmeter/trunk/bin/report-template/content/pages/Throughput.html.fmkr
    jmeter/trunk/bin/report-template/index.html.fmkr
    jmeter/trunk/bin/user.properties
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractOverTimeGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractVersusRequestsGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/HitsPerSecondGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/TotalTPSGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/generating-dashboard.xml

Added: jmeter/trunk/bin/report-template/content/js/customGraph.js.fmkr
Comment 6 Philippe Mouawad 2018-07-03 20:07:10 UTC
Author: pmouawad
Date: Tue Jul  3 20:06:47 2018
New Revision: 1835018

URL: http://svn.apache.org/viewvc?rev=1835018&view=rev
Log:
Bug 62166 - Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard

Fix Sonar warnings
Make code clearer and use CSVSaveService constants
Bugzilla Id: 62166

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java
Comment 7 Philippe Mouawad 2018-07-03 20:15:29 UTC
Author: pmouawad
Date: Tue Jul  3 20:15:06 2018
New Revision: 1835021

URL: http://svn.apache.org/viewvc?rev=1835021&view=rev
Log:
Bug 62166 - Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard

Fix issue in test
Bugzilla Id: 62166

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java
Comment 8 Philippe Mouawad 2018-08-24 21:23:23 UTC
Author: pmouawad
Date: Fri Aug 24 21:20:48 2018
New Revision: 1838965

URL: http://svn.apache.org/viewvc?rev=1838965&view=rev
Log:
Bug 62166 Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard.

Use the MeanAggregator
Bugzilla Id: 62166

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
Comment 9 Philippe Mouawad 2018-08-24 21:26:40 UTC
Author: pmouawad
Date: Fri Aug 24 21:25:22 2018
New Revision: 1838968

URL: http://svn.apache.org/viewvc?rev=1838968&view=rev
Log:
Bug 62166 Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard.

Use the MeanAggregator, fix test
Bugzilla Id: 62166
Comment 10 The ASF infrastructure team 2022-09-24 20:38:12 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4711