alexey.tsvetkov
05/16/2019, 7:07 PMkapt.verbose=true
to your gradle.properties
file (alternatively pass -Pkapt.verbose=true
in the command-line). If you don't use kapt.use.worker.api=true
flag, you must also run Gradle with at least INFO
log level (pass `-i`/`--info` in the command-line).
Then a log will contain something like:
[INFO] Annotation processor stats:
[INFO] LifecycleProcessor: total: 1 ms, init: 1 ms, 0 round(s):
[INFO] RoomProcessor: total: 709 ms, init: 44 ms, 4 round(s): 660 ms, 4 ms, 1 ms, 0 ms
[INFO] JsonClassCodegenProcessor: total: 159 ms, init: 0 ms, 4 round(s): 159 ms, 0 ms, 0 ms, 0 ms
[INFO] GlideAnnotationProcessor: total: 164 ms, init: 17 ms, 4 round(s): 145 ms, 1 ms, 0 ms, 1 ms
[INFO] ComponentProcessor: total: 1694 ms, init: 100 ms, 4 round(s): 724 ms, 869 ms, 1 ms, 0 ms
[INFO] AndroidProcessor: total: 702 ms, init: 16 ms, 4 round(s): 671 ms, 13 ms, 2 ms, 0 ms
[INFO] PatternsProcessor: total: 1 ms, init: 1 ms, 0 round(s):
There are a few problems though:
1. There is no summary for the whole project, the stats are printed on the per-task basis.
2. Don't use it with 1.3.3x
, because of the bug (https://youtrack.jetbrains.com/issue/KT-31471) all processors are printed as IncrementalProcessor
.
Alternatively you can use any JVM profiler tool to profile build process. If kapt.use.worker.api=true
is used, then you should profile a Gradle process, otherwise a KotlinCompileDaemon process.