Skip to content

Performance monitoring for Java applications through execution time tracking and data export.

License

Notifications You must be signed in to change notification settings

7orivorian/RuntimeProfiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RuntimeProfiler

GitHub all releases GitHub release (latest SemVer)

7orivorian's RuntimeProfiler enables performance monitoring for Java applications through execution time tracking and data export.

Features

  • 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.

Importing

Maven

  • 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>

Gradle

  • 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'
}

Other

Download a .jar file from releases.

Building

  • Clone this repository
  • Run mvn package

Packaged jar file can be found in the ./target/ directory.

Usage Example

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());
    }
}

License

This project is licensed under MIT.

MIT License Summary:

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.

About

Performance monitoring for Java applications through execution time tracking and data export.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published