What problem does it solve?
When Metro's Kotlin compiler plugin feels slow, guessing from source code rarely identifies the real bottleneck. This Skill lets you query Metro's perfetto trace files directly with SQL to find actual hot spots, measure phase durations, and detect untraced time gaps inside compiler phases.
Core Features & Use Cases
- Trace Querying: Run SQL against the perfetto
slice table via the Python perfetto library to rank spans by duration, sum repeated spans by name, and drill into children of any phase.
- Gap Analysis: Compare a parent span's duration against the sum of its direct children to find untraced work, then decide where to add
trace(...) instrumentation.
- Fresh Trace Generation: Produce new traces from a real project with
./metrow trace or from the in-repo benchmark with benchmark/trace_compile.sh, optionally opening them in ui.perfetto.dev.
- Use Case: A user shares a perfetto screenshot showing a slow build. You query the trace, discover "Collect supertypes" takes 7.5ms while the suspected "Process declarations" takes only 1.2ms, and direct the optimization effort accordingly.
Quick Start
Analyze the Metro perfetto trace file I just shared and tell me where the compiler is spending the most time.