perfetto-sql

Convert natural language performance questions into Perfetto SQL and run them on local trace files.

4|Updated Aug 18, 2016
One-click install
npx skills add https://github.com/esafirm/dotfiles --skill perfetto-sql-esafirm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-sql
Source: https://github.com/esafirm/dotfiles/tree/main/.gemini/skills/perfetto-sql
Command: npx skills add https://github.com/esafirm/dotfiles --skill perfetto-sql-esafirm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the friction of manually writing Perfetto queries by turning performance questions into executable SQL against Android trace files.

Core Features & Use Cases

  • Natural Language to SQL: Converts high-level trace analysis requests into valid Perfetto SQL.
  • Trace Execution Workflow: Runs queries locally with trace_processor and returns results in a machine-friendly format.
  • Performance Investigation: Helps analyze slices, threads, CPU behavior, memory activity, and startup timing in Perfetto traces.

Quick Start

Ask the skill to analyze your Perfetto trace and return the SQL query and results for the performance question you want answered.

Frequently Asked Questions about perfetto-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Perfetto SQL queries for Android trace analysis?

You can generate Perfetto SQL by converting natural language performance questions into valid queries for Android trace analysis. This handles slice timing, thread scheduling, and CPU usage without manual SQL writing.

How does trace_processor work for analyzing Perfetto trace files?

trace_processor runs valid Perfetto SQL queries locally against trace files and returns results in a machine-friendly format. It handles standard library module selection and safe processing of incomplete intervals.

What's the best way to analyze thread scheduling and CPU usage in Perfetto?

The best way to analyze thread scheduling and CPU usage is transforming natural language questions into executable Perfetto SQL. This approach constructs idempotent queries to investigate trace behavior locally.

Do I need trace_processor to run Perfetto SQL locally?

Yes, trace_processor execution is required to run the generated Perfetto SQL queries against a local trace file. It processes the queries and outputs results for performance investigation.

Can I analyze memory profiling and startup timing with Perfetto SQL?

Yes, you can analyze memory activity and startup timing by generating Perfetto SQL from natural language questions. The queries target specific trace slices and memory profiling data.

How do I handle incomplete intervals when querying Perfetto traces?

Handling incomplete intervals in Perfetto traces requires safe query construction with unique trace identifiers. The SQL generation process applies safe handling to ensure accurate results for partial trace data.