# markzhai/androidperformancemonitor

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/markzhai-androidperformancemonitor).**

6,730 stars · 1,019 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/markzhai/AndroidPerformanceMonitor
- awesome-repositories: https://awesome-repositories.com/repository/markzhai-androidperformancemonitor.md

## Topics

`android` `anr` `apm` `blockcanary` `detection-library` `monitor` `performance`

## Description

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.

## Tags

### Mobile Development

- [UI Performance Debugging](https://awesome-repositories.com/f/mobile-development/android-application-debugging/ui-performance-debugging.md) — Detects UI freezes and blocks on the main thread to help identify performance bottlenecks in Android apps.
- [Android Application Debugging](https://awesome-repositories.com/f/mobile-development/android-application-debugging.md) — Provides tools for inspecting runtime behavior and capturing stack dumps to debug Android performance lags.
- [Main Thread Responsiveness Monitoring](https://awesome-repositories.com/f/mobile-development/main-thread-responsiveness-monitoring.md) — Monitors the Android main thread for hangs and notifies developers when responsiveness thresholds are exceeded.
- [UI Block Detectors](https://awesome-repositories.com/f/mobile-development/ui-block-detectors.md) — Monitors the Android main thread to detect UI freezes based on configurable time thresholds.
- [Android Log Management](https://awesome-repositories.com/f/mobile-development/android-log-management.md) — Manages, filters, and exports performance logs specifically for the Android ecosystem.

### Software Engineering & Architecture

- [Blocking Detection Tools](https://awesome-repositories.com/f/software-engineering-architecture/non-blocking-event-loops/blocking-detection-tools.md) — Monitors the main thread for freezes exceeding a time threshold and triggers system alerts. ([source](https://github.com/markzhai/androidperformancemonitor#readme))
- [Stack Trace Generation](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/stack-trace-generation.md) — Captures and generates full runtime call stacks of the main thread to identify the source of UI blocks.
- [Stack Frame Filtering](https://awesome-repositories.com/f/software-engineering-architecture/tracing-instrumentation/trace-filters/stack-frame-filtering.md) — Filters out irrelevant system and third-party package frames from stack traces using a whitelist.

### System Administration & Monitoring

- [Alert Thresholds](https://awesome-repositories.com/f/system-administration-monitoring/alert-thresholds.md) — Uses preconfigured millisecond time limits to trigger alerts when the main thread becomes unresponsive.
- [Mobile Performance Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/application-performance-monitoring/application-performance-monitoring/mobile-performance-monitoring.md) — Provides a library to pinpoint application degradation via thread stack dumps and performance logs.
- [Thread Activity Monitors](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/virtual-thread-monitors/thread-activity-monitors.md) — Employs a background watchdog thread to monitor the main thread's heartbeat and detect freezes.
- [Thread Performance Analyzers](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/virtual-thread-monitors/thread-performance-analyzers.md) — Captures thread stack dumps during execution blocks to identify the cause of performance degradation. ([source](https://github.com/markzhai/AndroidPerformanceMonitor/blob/master/README_CN.md))
- [Alert Notification Systems](https://awesome-repositories.com/f/system-administration-monitoring/alert-notification-systems.md) — Triggers system-level notifications to alert developers immediately when a main thread block is detected.
- [Diagnostic Log Filtering](https://awesome-repositories.com/f/system-administration-monitoring/log-ingestion/log-field-mappings/monitoring-instance-log-exporters/filtered-log-exports/diagnostic-log-filtering.md) — Excludes irrelevant system or third-party package frames from performance logs using a whitelist. ([source](https://github.com/markzhai/AndroidPerformanceMonitor/blob/master/README_CN.md))

### Part of an Awesome List

- [Debugging and Inspection](https://awesome-repositories.com/f/awesome-lists/devtools/debugging-and-inspection.md) — Transparent UI-block detection library.
