Analysis updated 2026-06-24
Find which piece of code is causing your Android app's UI to freeze by seeing exact stack traces from freeze events.
Add UI freeze detection to debug builds with a single line of code in your app's startup class.
Configure a threshold in milliseconds so only operations slower than your defined limit are recorded and reported.
| markzhai/androidperformancemonitor | getactivity/xxpermissions | meituan-dianping/leaf | |
|---|---|---|---|
| Stars | 6,730 | 6,731 | 6,749 |
| Language | Java | Java | Java |
| Setup difficulty | easy | easy | hard |
| Complexity | 2/5 | 2/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Include the no-op dependency in release builds to ensure zero performance overhead in production.
AndroidPerformanceMonitor, also known as BlockCanary, is an Android library that helps developers find out why their app's user interface occasionally freezes or feels sluggish. On Android, all UI updates happen on a single main thread. If any piece of code running on that thread takes too long, the screen stops responding until it finishes. Users experience this as a stutter or brief hang. BlockCanary detects when this happens, records the details, and shows them in a notification and a built-in screen inside your app. Setup takes one line of code placed in your app's startup class. When a block is detected, the library captures a stack trace of what the main thread was doing at the time, along with the device's CPU and network state and any user ID or version information you configure. This information is saved locally and displayed in a list so you can see which operations are causing slowdowns. You can configure how sensitive the detection is by setting a threshold in milliseconds. Any operation that takes longer than that threshold is recorded as a block. The default is one second. You can also provide a list of packages you care about so the stack traces are filtered to show only your own code, and a white list of packages like browser components that you want to ignore. The library is available through Maven Central and is added to an Android project via a Gradle dependency. There is also a no-op version that compiles in release builds without any overhead, which means you can keep the detection active only during development and testing. The name is a tribute to LeakCanary, another popular Android diagnostic tool. BlockCanary is released under the Apache 2.0 license.
An Android library (BlockCanary) that detects when your app's UI freezes, records the stack trace and device state at the time, and shows the details in a notification, helping you find the exact code causing slowdowns.
Mainly Java. The stack also includes Java, Android, Gradle.
Use freely in any project, including commercial ones, as long as you keep the copyright notice (Apache 2.0 license).
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.