AndroidPerformanceMonitor is a diagnostic library and debugging tool designed to detect UI freezes and monitor main thread responsiveness in Android applications. It functions as a UI block detector that identifies performance degradation by capturing thread stack dumps and performance logs.
The tool utilizes a watchdog mechanism to monitor the main thread for hangs based on configurable time thresholds. When a block is detected, it captures a full call stack dump and triggers system-level alert notifications to notify developers immediately.
The library includes capabilities for performance log management, allowing for the filtering of irrelevant system or third-party package frames via a whitelist. Captured diagnostic data is persisted to local storage and can be exported as compressed logs for remote analysis.