Skip to content

Frame Jank Analysis

Analyze frame rendering performance and detect janky frames that cause visible stuttering.

Overview

Frame jank occurs when a frame takes longer than the vsync interval (typically 16.67ms for 60fps) to render. perfetto-cli classifies frames into severity levels and provides performance summaries.

Commands

frame jank

Detect janky frames with severity classification.

perfetto-cli -t trace.perfetto-trace -p com.example.app frame jank

Severity levels:

Level Criteria
SMOOTH < 1x threshold
JANK 1x-2x threshold
BIG_JANK 2x-4x threshold
HUGE_JANK > 4x threshold

Options:

Option Description Default
--threshold <ms> Jank threshold in milliseconds 16

frame summary

Frame performance summary with overall rating.

perfetto-cli -t trace.perfetto-trace -p com.example.app frame summary

Reports total frames, jank rate, P95/P99 frame times, and an overall performance rating.

Workflow

  1. Run frame summary for a quick performance overview
  2. If jank rate is high, run frame jank to see individual janky frames
  3. Use timestamps from janky frames with cpu hotspots to identify what's blocking the main thread

Tips

  • Adjust --threshold for different refresh rates (e.g., 8ms for 120fps displays)
  • Use -f json to track frame performance metrics over time
  • Combine with cpu hotspots to find the slices causing jank