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.
<dependency>
<groupId>dev.7ori</groupId>
<artifactId>runtimeprofiler</artifactId>
<version>2.1.0</version>
</dependency>dependencies {
implementation 'dev.7ori:runtimeprofiler:2.1.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
/* Code to be profiled */
profiler.swap("Sub-Section_2"); // Included in the runtime of Section_A
/* Code to be profiled */
profiler.pop();
profiler.swap("Section_B");
/* Code to be profiled */
profiler.pop();
profiler.stop();
OutputWriter.HTML.writeToPath(profiler, new File("<output_dir>").toPath());
}
}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.