jfrunit icon indicating copy to clipboard operation
jfrunit copied to clipboard

Automatic Analysis of JFR Events

Open johnaohara opened this issue 3 years ago • 3 comments

Java Mission Control has an Expert System that can run rules against JFR recordings and perform an Automated Analysis to identify and generate a risk score against common performance issues.

I have a POC branch that allows the assertions to be written against the results of an automatic JFR analysis : https://github.com/johnaohara/jfrunit/tree/auto-analysis

The main difficulty using this branch at the moment is the JMC core libraries are not published to Maven central, see: https://bugs.openjdk.java.net/browse/JMC-6813 . Therefore, anyone wanting to use this branch must first build and locally install https://github.com/openjdk/jmc

At present this branch could not be merged into the main branch. One possibility could be to keep the automatic analysis in a separate artefact e.g. jfrunit-auto-analysis and users can import that artefact, as well as jfrunit if they wish to use the automatic analysis feature and have built JMC core locally.

@gunnarmorling wdyt?

Thanks

johnaohara avatar Jul 28 '21 08:07 johnaohara

Hey @johnaohara, sorry for the radio silence, just back from PTO :) Thanks a lot for this idea, I think this sounds awesome. I'll take a look at your branch asap and then come back to you.

Re the library issue, some JMC artifacts are on Maven Central now: http://hirt.se/blog/?p=1320. Would this solve that issue?

gunnarmorling avatar Aug 03 '21 19:08 gunnarmorling

Hey @gunnarmorling yes that is awesome!

The auto analysis relies on org.openjdk.jmc:flightrecorder.rules that are indeed in maven central now : https://mvnrepository.com/artifact/org.openjdk.jmc/flightrecorder.rules

So we wouldn't need a separate artefact :)

I'll update my branch

johnaohara avatar Aug 03 '21 19:08 johnaohara

Nice! Could you create a "Draft" PR with the proposed change perhaps? That'd make it a bit easier to discuss the details.

gunnarmorling avatar Aug 03 '21 19:08 gunnarmorling