perfGenie is a Java flight recorder(JFR) format profile and Jstack parsing and web visualization tool. JFR profiles can be created using Java machine control(JMC), Java flight recorder, Async-profiler or jcmd. It provides the ability to view profiles in the form of context trees, samples explorer, flame Graph, thread state, river and hotspot surface views. It helps to compare two profiles using context tree diff or flame graph diff views. It also provides functionality to filter profiles for a given custom event context, tid or thread name etc. Request timeline view helps in looking at samples of an individual request context. It also has the option to visualize thread context request and context metric timeline views. The aggregation feature helps in combining profiles for a longer period. Thread dumps can also be converted into supported profile views.
perfGenie can be deployed as a continuous profiling solution. It uses Cantor (https://github.com/salesforce/cantor) as a data layer, Cantor can be configured to store data in H2, MySQL or S3. This project is set up with a simple cron job to monitor a directory for any JFR files, parse and store in H2 (default configuration).
$ git clone [email protected]:salesforce-misc/perfGenie.git
$ export JAVA_HOME=<jdk home path>
$ mvn clean install
add profiles and custom events to be parsed in config.properties file
ex:
customevents=LogContext;MqFrm;CPUEvent;MemoryEvent
profiles=ExecutionS;Socket
jfrdir=/tmp/jfrs
tenant=dev
h2dir=/tmp/h2.db
$ java -jar perfgenie/target/perfgenie-0.0.1-SNAPSHOT.jar
Access URL http://localhost:8080
The application server has a cron job to monitor and parse JFR (*.jfr or .jfr.gz), Jstack (.jstack) files available at /tmp/jfrs/
Note: example files provided in examples directory can be copied into jfrdir for testing
Note: refer simiulator module to generate a sample jfr with custom events added
- Tree view (backtrace, calltree and compare view)
- Samples explorer view (grouping samples by tid, thread name and custom event context dimensions)
- Flame graph view (backtrace, calltree and compare view)
- Thread state view (This view is supported for thread dumps)
- River view (Stack trace timeline view)
- Hotspot surface (3D Stacktrace timeline view)
- Custom event table view
- Custom event context filters on profile
- Thread request view (based on custom events)
- Metric timeline view (based on custom event metrics)
- Request timeline view (to see samples of single request)
Work in progress
Work in progress