7orivorian's RuntimeProfiler enables 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.
- Include JitPack in your maven build file (usually
pom.xml
)
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add the dependency
<dependency>
<groupId>com.github.7orivorian</groupId>
<artifactId>RuntimeProfiler</artifactId>
<version>1.1.0</version>
</dependency>
- Add JitPack to your root
build.gradle
at the end of repositories
repositories {
maven {
url 'https://jitpack.io'
}
}
- Add the dependency
dependencies {
implementation 'com.github.7orivorian:RuntimeProfiler:1.1.0'
}
Download a .jar
file from
releases.
- Clone this repository
- Run
mvn 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.