perfetto-cli¶
A CLI tool for Android Perfetto trace analysis — ANR detection, frame jank, CPU profiling, memory leak detection, binder transactions, and raw SQL queries, all from the terminal.
Features¶
- ANR Detection — Detect ANR events with severity classification and multi-signal root cause analysis
- Frame Jank Analysis — Identify janky frames (SMOOTH/JANK/BIG_JANK/HUGE_JANK) with performance ratings
- CPU Profiling — Thread-level utilization, hotspot slices, contention analysis, DVFS frequency
- Memory Analysis — RSS-based leak detection with growth trend, heap dominator tree
- Binder Transactions — IPC profiling with AIDL interface and server process grouping
- Raw SQL Queries — Execute PerfettoSQL directly, search slices by pattern
- Trace Capture — Capture traces from device via adb with custom config
- Multiple Output Formats — Text (Rich colorized), Table (ASCII), JSON (machine-readable)
Quick Links¶
- Getting Started — Install and run your first analysis
- User Guide — In-depth guides for each analysis type
- CLI Reference — Complete command and option reference
- Contributing — Help improve perfetto-cli
Why perfetto-cli?¶
Perfetto traces contain rich performance data, but extracting insights typically requires the Perfetto UI or writing custom SQL. perfetto-cli bridges this gap by providing purpose-built commands that surface actionable insights directly in your terminal — no browser needed.