Automating Android Build Benchmarking with Gradle Profiler
Article Summary
Doni Winata from Traveloka's Android Infra team reveals how his team automated build benchmarking to catch performance regressions before they hit production. For projects with 300+ modules and 15-20 minute build times, manual benchmarking isn't an option.
Benchmarking Android builds is notoriously tricky due to cache states, daemon conditions, and project size. Doni's team integrated Gradle Profiler with Gradle Enterprise on their CI/CD pipeline to automate the entire process, enabling daily monitoring and regression detection without blocking developer machines.
Key Takeaways
- Gradle Profiler automates benchmarking by running multiple build iterations with warm-ups
- CI/CD integration saves time: benchmark 300+ module projects without blocking local machines
- Gradle Enterprise dashboard filters builds by scenario, branch, and tags for easy comparison
- Four key scenarios monitored daily: full build, incremental, clean build, and R8/minify
- Caught real regressions: R8 build slowdown from debuggable setting and memory leaks
Automating build benchmarks with Gradle Profiler and Gradle Enterprise enabled Traveloka to monitor daily builds, compare branches effortlessly, and catch performance regressions that would otherwise slip through.