This is a simple Java application designed to test and compare the outputs of Java Flight Recorder (JFR) and Async-Profiler.
Note: JFR files might contain sensitive metadata that can be difficult to safely share. This application allows you to generate these files locally, enabling safe inspection and comparison of profiling data.
- Ensure you have Java Development Kit (JDK) installed on your system.
- Download Async-Profiler from its official repository.
-
Clone the Repository
Clone this repository to your local machine.
git clone <repository-url> cd jfr_vs_ap
-
Set Up Directories
Ensure the necessary directories are prepared:
mkdir -p OUTPUTS/jfr
-
Run with Java Flight Recorder
Execute the application using JFR:
./run-with-jfr.sh
This will generate JFR recording files in the
OUTPUTS/jfrdirectory. -
Run with Async-Profiler
Execute the application using Async-Profiler:
./run-async-profiler.sh /path/to/libasyncProfiler.dylib
Replace
/path/to/libasyncProfiler.dylibwith the correct path to thelibasyncProfiler.dylib(for linux this is a .so file) file from your Async-Profiler download.
- Inspect the outputs located in
outputs/jfrandoutputs/ap.