gradle-profiler icon indicating copy to clipboard operation
gradle-profiler copied to clipboard

clear-build-cache-before=BUILD doesn't seem to clear the build cache for every measured build

Open kenyee opened this issue 3 years ago • 1 comments

clear-build-cache-before=BUILD doesn't seem to give consistent results...seems like the build cache is being used for measured builds 2/3? The gradle-profiler is run w/ --no-daemon.

For one warmup and 3 measured, the results are:

scenario,asSync,asSync,asSync,asSync,asSync,cleanBuild,abiChange
version,Gradle 7.5.1,Gradle 7.5.1,Gradle 7.5.1,Gradle 7.5.1,Gradle 7.5.1,Gradle 7.5.1,Gradle 7.5.1
tasks,AS sync,AS sync,AS sync,AS sync,AS sync,:app:tfa:assembleDefaultDebug,:app:tfa:assembleDefaultDebug
value,total execution time,Gradle execution time #1,Gradle execution time #2,Gradle total execution time,IDE execution time,total execution time,total execution time
warm-up build #1,652020,243445,677,244122,407898,2207824,628550
measured build #1,629306,243105,1163,244268,385038,2196378,580866
measured build #2,596122,220464,1087,221551,374571,165901,515825
measured build #3,609388,230430,1242,231672,377716,177320,470400

Using gradle-profiler built off master Aug 30th (we're doing AS sync testing and the latest release which is 0.18.0 doesn't work with it).

kenyee avatar Sep 05 '22 20:09 kenyee

In comparison, running using the --no-build-cache parameter to the gradle command gives more consistent clean build results of roughly 15min:

tasks,:app:tfa:assembleDefaultDebug
value,total execution time
warm-up build #1,879473
measured build #1,916200
measured build #2,915141
measured build #3,876748

Also no idea why clear-build-cache-before takes so long for the warmup and first measured build...35min is abnormal and is more of an Intel macbook speed than an M1 macbook speed for a full build of our app...

kenyee avatar Sep 06 '22 00:09 kenyee