MobileLab: Prevent Mobile Performance Regressions
Article Summary
Facebook ships thousands of commits daily to their mobile apps. How do you catch a 1% performance regression before millions of users feel it?
Facebook's engineering team built MobileLab, a highly deterministic testing system that detects tiny mobile performance regressions. The system has already prevented thousands of regressions from reaching production by achieving unprecedented measurement accuracy.
Key Takeaways
- Improved confidence intervals by 7x while reducing false positives by 75%
- Locks CPU and GPU frequencies to eliminate thermal throttling variance
- Uses HTTP proxy to replay network responses for consistent test conditions
- Resets app state and device clock between trials for true repeatability
- Automated bisect finds the exact commit causing regressions within hours
Critical Insight
MobileLab can reliably detect performance changes as small as 1% with just 50 trials, catching regressions that were previously invisible.