A Saga of Improvement in Android App Performance (Part 3)
Article Summary
Tokopedia built an internal tool that automatically finds Android performance bottlenecks. No more manual trace analysis or guessing which methods are slowing you down.
In Part 3 of their performance series, Tokopedia's Android team reveals how they automated performance profiling at scale. Traditional tools like systrace and Android Studio Profiler require too much manual work to be practical for continuous monitoring.
Key Takeaways
- Sherlock automatically reports all methods taking over 32ms and generates flamegraphs
- Runs daily on release branches via Jenkins, Firebase Test Lab, and custom scripts
- DataStudio dashboard shows hung methods with time percentages and historical trends
- Uses Debug.startMethodTracingSampling() in instrumentation tests to capture traces
- Converts traces to flamegraphs using aflame, parses to MySQL for reporting
Tokopedia automated Android performance profiling with a custom tool that identifies bottlenecks daily, eliminating manual trace analysis and speeding up regression detection.
About This Article
Tokopedia's developers found it hard to spot performance regressions quickly. Android's standard profiling tools like systrace and Android Studio Profiler required a lot of manual work and time spent analyzing traces to find where things were slowing down.
Vishal Gupta's team built Sherlock to automatically flag methods that exceed 32ms thresholds and create flamegraphs. The tool runs through a Jenkins pipeline that connects Firebase Test Lab, aflame conversion, and MySQL data parsing.
Sherlock runs daily on release branches and sends performance summaries to Slack automatically. Developers can now spot regressions and review performance history without spending time manually investigating traces.