gradle / gradle-profiler

A tool for gathering profiling and benchmarking information for Gradle builds
Apache License 2.0
1.39k stars 156 forks source link

How to create the profiling scenarios for different JDK versions #531

Closed Garenzhou closed 7 months ago

Garenzhou commented 7 months ago

I want to compare the difference in compilation performance when using JDK17 and JDK11, but the profiling scenarios does not seem to support switching of JDK.

Garenzhou commented 7 months ago

Just setting up different java.home by using system-properties, It is useful to me.

clean_build_jdk11 {
    title = "build_with_jdk11"
    tasks = ["bundleDebug"]
    gradle-args = ["--no-build-cache", "--scan"]
    system-properties {
        "org.gradle.java.home" = "/Users/garen/Library/Java/JavaVirtualMachines/jdk11"
    }
    daemon = "cold" // value can be "warm", "cold", or "none"
    cleanup-tasks = ["clean"]
}
clean_build_jdk17 {
    title = "build_with_jdk17"
    tasks = ["bundleDebug"]
    gradle-args = ["--no-build-cache", "--scan"]
    system-properties {
        "org.gradle.java.home" = "/Users/garen/Library/Java/JavaVirtualMachines/jdk17"
    }
    daemon = "cold" // value can be "warm", "cold", or "none"
    cleanup-tasks = ["clean"]
}