SlideShare a Scribd company logo
Take advantage of Memory
Analyzer Tool inside your
Continuous Integration
Aurélien Pupier
R&D Engineer, Studio Development Leader
@apupier
©2014 Bonitasoft
Agenda
• Why using MAT?
• How to
–Programmatic Heap Dump
–Choose your report
–Headless report generation
–CI integration
• Going further
©2013 Bonitasoft 2
Why using MAT?
©2013 Bonitasoft 3
Before – how we detect Memory Leak? (1/3)
• Manual QA tests
©2013 Bonitasoft 4
Before – how we detect Memory Leak? (2/3)
• Client
©2013 Bonitasoft 5
Before – how we detect Memory Leak? (3/3)
• Dumb performance tests
– Dedicated test suite
– Open 100 diagrams
– Only very big OOM
– Check no crash
©2013 Bonitasoft 6
Unit Test
Integration
Test
Performance
Test
Manual QA
Test
Client
Detect early
©2013 Bonitasoft 7
It’s
complicated
It’scomplicated
How to
©2013 Bonitasoft 8
Required materials
©2013 Bonitasoft 9
Programmatic Heap Dump
©2013 Bonitasoft 10
Heap Dumper Java code
• Mbean
– com.sun.management:type=HotSpotDiagnostic
• JVM-specific
©2013 Bonitasoft 11
When?
• All tests played and finished
– Memory should be clean
– Take care to close everything
• End of Test Suite
©2013 Bonitasoft 12
When? Afterclass
©2013 Bonitasoft 13
Plug-in specificity
• Extension point used
– Avoid JVM dependency
• Extract interface for HeapDumper
• Close project Eclipse compiler mic-mac
©2013 Bonitasoft 14
Global picture
©2013 Bonitasoft 15
MBean provider
Heap Dumper Extension point
Test suite executor
Heap Dumper Provider
Choose your report
Find your happiness… or create it
©2013 Bonitasoft 16
Provided
©2013 Bonitasoft 17
Custom report
• AllTests_custom_htmlindex.html
©2013 Bonitasoft 18
Headless report generation
MAT – “There’s an app for that”
©2013 Bonitasoft 19
Headless report generation
• Generate report
– org.eclipse.mat.api.parse <dumpFile> <reportId>
– Leak suspects id: org.eclipse.mat.api:suspects
• Unzip reports
– Keep <report-name>_html
– Clean folder
• *.zip
• *.index
• *.threads
©2013 Bonitasoft 20
CI Integration
©2013 Bonitasoft 21
Build steps – Generate report
©2013 Bonitasoft 22
Build steps – Use reports
©2013 Bonitasoft 23
Reports availability
©2013 Bonitasoft 24
Fail the build
• Custom script parsing report
– Custom for each report
– Define your own thresholds
• Last build step
• Return value != 0
©2013 Bonitasoft 25
Going further
©2013 Bonitasoft 26
Possible improvements
• Provide an Hudson/Jenkins plugin for MAT
– Download
– Pre-defined list of available reports
– Pre-defined thresholds to fail the build
– Conditional Launch (only for Nightly?)
– Group reports
• MAT
– Allow to return a status code when generating report
– Handle thresholds
– Use compare feature
©2013 Bonitasoft 27
©2013 Bonitasoft 28
Evaluate This Session
Sign-in: www.eclipsecon.org
Select session from schedule
Evaluate:
1
2
3

More Related Content

Similar to Take advantage of memory analyzer tool inside your continuous integration (20)

PPT
Distilling Dumps: a Guide to Using and Extending Memory Analyzer
AJohnson1
 
PPT
Using and Extending Memory Analyzer into Uncharted Waters
Vladimir Pavlov
 
PPTX
EclipseMAT
Ali Bahu
 
ODP
Windows Debugging Tools - JavaOne 2013
MattKilner
 
PDF
Debugging Java from Dumps
Chris Bailey
 
PDF
WebSphere Technical University: Introduction to the Java Diagnostic Tools
Chris Bailey
 
PPT
Eclipse Memory Analyzer - More Than Just a Heap Walker
guest62fd60c
 
PPT
Eclipse Memory Analyzer
nayashkova
 
PDF
A165 tools for java and javascript
Toby Corbin
 
PDF
Introduction to the IBM Java Tools
Chris Bailey
 
PDF
Impact2014: Introduction to the IBM Java Tools
Chris Bailey
 
PDF
Java performance - not so scary after all
Holly Cummins
 
PDF
Web Sphere Problem Determination Ext
Rohit Kelapure
 
PDF
Hp java heap dump analysis Workshop
Madhavan Marimuthu
 
PDF
Tuning Android Applications (Part One)
CommonsWare
 
PPTX
Heap Dump Analysis - AEM: Real World Issues
Kanika Gera
 
PDF
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
PPT
Practical lessons in memory analysis
AJohnson1
 
PDF
Ps ts 4118-304118_230-1_fin_v1
AJohnson1
 
PDF
JavaOne 2014: Java Debugging
Chris Bailey
 
Distilling Dumps: a Guide to Using and Extending Memory Analyzer
AJohnson1
 
Using and Extending Memory Analyzer into Uncharted Waters
Vladimir Pavlov
 
EclipseMAT
Ali Bahu
 
Windows Debugging Tools - JavaOne 2013
MattKilner
 
Debugging Java from Dumps
Chris Bailey
 
WebSphere Technical University: Introduction to the Java Diagnostic Tools
Chris Bailey
 
Eclipse Memory Analyzer - More Than Just a Heap Walker
guest62fd60c
 
Eclipse Memory Analyzer
nayashkova
 
A165 tools for java and javascript
Toby Corbin
 
Introduction to the IBM Java Tools
Chris Bailey
 
Impact2014: Introduction to the IBM Java Tools
Chris Bailey
 
Java performance - not so scary after all
Holly Cummins
 
Web Sphere Problem Determination Ext
Rohit Kelapure
 
Hp java heap dump analysis Workshop
Madhavan Marimuthu
 
Tuning Android Applications (Part One)
CommonsWare
 
Heap Dump Analysis - AEM: Real World Issues
Kanika Gera
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
Practical lessons in memory analysis
AJohnson1
 
Ps ts 4118-304118_230-1_fin_v1
AJohnson1
 
JavaOne 2014: Java Debugging
Chris Bailey
 

More from Aurélien Pupier (14)

PDF
How to contribute textual tooling for apache camel in several id es
Aurélien Pupier
 
PDF
Feedback from an eclipse plugin developer to provide support to large set of ...
Aurélien Pupier
 
PDF
Adopting language server for apache camel feedback from a java/Eclipse plugi...
Aurélien Pupier
 
PDF
Why and how to leverage apache camel integration framework in your io t archi...
Aurélien Pupier
 
PDF
Master your integration projects on premise and in the cloud with fuse tooling
Aurélien Pupier
 
ODP
Classic middleware integration for your IoT Gateways integration
Aurélien Pupier
 
PDF
Fast unit tests for Eclipse Plugins
Aurélien Pupier
 
PDF
Functional Testing made easy with SWTBot for Developers and Testers
Aurélien Pupier
 
PDF
Committing IDE meta files: misconceptions, misunderstandings, and solutions.
Aurélien Pupier
 
PPTX
How to contribute to Eclipse
Aurélien Pupier
 
PDF
Time to build and test results 3x faster - how we did it
Aurélien Pupier
 
PDF
Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)
Aurélien Pupier
 
PDF
What's new GMF for Juno?
Aurélien Pupier
 
PDF
What's hot Juno?
Aurélien Pupier
 
How to contribute textual tooling for apache camel in several id es
Aurélien Pupier
 
Feedback from an eclipse plugin developer to provide support to large set of ...
Aurélien Pupier
 
Adopting language server for apache camel feedback from a java/Eclipse plugi...
Aurélien Pupier
 
Why and how to leverage apache camel integration framework in your io t archi...
Aurélien Pupier
 
Master your integration projects on premise and in the cloud with fuse tooling
Aurélien Pupier
 
Classic middleware integration for your IoT Gateways integration
Aurélien Pupier
 
Fast unit tests for Eclipse Plugins
Aurélien Pupier
 
Functional Testing made easy with SWTBot for Developers and Testers
Aurélien Pupier
 
Committing IDE meta files: misconceptions, misunderstandings, and solutions.
Aurélien Pupier
 
How to contribute to Eclipse
Aurélien Pupier
 
Time to build and test results 3x faster - how we did it
Aurélien Pupier
 
Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)
Aurélien Pupier
 
What's new GMF for Juno?
Aurélien Pupier
 
What's hot Juno?
Aurélien Pupier
 
Ad

Recently uploaded (20)

PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Ad

Take advantage of memory analyzer tool inside your continuous integration