Performance monitoring for Java applications through execution time tracking and data export.
- Easy integration & usage.
- Seamlessly add profiling capabilities to your Java projects with only a few lines of code.
- Context switching:
- Compare performance between different code sections.
- Detailed data export:
- Output profiling data for in-depth analysis, reporting, & graphing.
Tip
I am currently beta testing a visualizer for JSON-formatted reports, which can be found here.
<dependency>
<groupId>dev.7ori</groupId>
<artifactId>runtimeprofiler</artifactId>
<version>3.0.0</version>
</dependency>dependencies {
implementation 'dev.7ori:runtimeprofiler:3.0.0'
}Download a .jar file from
releases.
- Clone this repository
- Run
mvn clean package
Packaged jar file can be found in the ./target/ directory.
public class Main {
public static void main(String[] args) {
Profiler profiler = new Profiler("MyProfiler");
profiler.start();
profiler.push("Section_A");
profiler.push("Sub-Section_1"); // Included in the runtime of Section_A
foo();
profiler.swap("Sub-Section_2"); // Included in the runtime of Section_A
bar();
profiler.pop();
profiler.swap("Section_B");
foobar();
profiler.pop();
profiler.stop();
Reporter.write(profiler).to(System.out).format(ReportFormat.SIMPLE_PRINT).report();
}
}This project is licensed under MIT.
The MIT License is a permissive open-source license that allows you to use, modify, and distribute the software for both personal and commercial purposes. You are not required to share your changes, but you must include the original copyright notice and disclaimer in your distribution. The software is provided "as is," without any warranties or conditions.