Confused by some numbers from gradle-profiler. I'...
# community-support
c
Confused by some numbers from gradle-profiler. I'm trying to benchmark what a typical "rebuild" of an android app would be after I add a line
println()
and rebuild. If I do this like 10 times in a row manually I get about a ~4 second build time. If I use gradle profiler with
apply-non-abi-change-to
("Change the body of a public method in a Java or Kotlin source class.") the lowest time I'll see is a 7 second build time over the 10 default runs (with default 6 warm ups). Anyone have a clue on how to debug why it seems like like build time is consistently close to twice of what "real world" testing shows?
a
have you tried to compare build scans?
in general, I think there is some diference, maybe daemon is starting, maybe something else. also 4 vs 7 sec is not so huge difference, if just 1 sec could be spent on just starting daemon, it's JVM after all
Anyway, different JVMs, different JVM settings and so on
c
i have not compared build scans. it should use my gradle properties in both situations so it should be using the daemon. i agree that 4 to 7 isn't huge, but it is in this case, and im a bit more worried why i can't repro a 7 second build in AS, meanwhile it seems to repro easily in gralde-profiler.
a
First thing you should really compare build scans and check the differences
it should use my gradle properties in both situations so it should be using the daemon
It's just an example about daemon, profiler can override pretty much everything, including JVM
c
interesting. i wonder how i can run a build scan on a gradle-profiler but i will do that. thank you. you're probably right that theres some sort of difference.
a
> In order to create a build scan of your build, use
--profile buildscan
. The build scan URL is reported on the console and is also available in
profile-out/profile.log
. https://github.com/gradle/gradle-profiler?tab=readme-ov-file#gradle-build-scans
And just in case, do you exactly replicate what Gradle is doing?
"Change the body of a public method in a Java or Kotlin source class."
Because if different file is changed or change is different (like accidentally change inline function for example), your build time also could be different Not that it's the most possible reason for it, but just one more concideration
c
thanks i will try to double check all of my settings here. appreciate it andrey