perfetto-sql

Translate natural language intents into Perfetto SQL queries for Android trace analysis.

28|5|Updated Oct 8, 2024
One-click install
npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill perfetto-sql-kabirnayeem99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-sql
Source: https://github.com/kabirnayeem99/Ktor2Curl/tree/main/.agents/skills/perfetto-sql
Command: npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill perfetto-sql-kabirnayeem99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill bridges the gap between complex Android performance trace data and actionable insights by translating natural language queries into syntactically correct Perfetto SQL.

Core Features & Use Cases

  • Automated Trace Analysis: Query slice, thread, and memory data from Android Perfetto traces without manual SQL construction.
  • Standard Library Integration: Leverages pre-built Perfetto modules for complex performance metrics like app startup times and CPU frequency.
  • Use Case: Quickly identify the root cause of UI jank by asking the system to calculate the total duration of all slices matching a specific render thread pattern across a trace file.

Quick Start

Use the perfetto-sql skill to analyze the provided trace file and calculate the total duration of all slices named RenderThread.

Frequently Asked Questions about perfetto-sql

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

FAQPage Schema
How do I query Android trace data without writing SQL manually?

You can query Android trace data by translating natural language intents into syntactically valid Perfetto SQL. This allows you to extract performance metrics like slice durations and thread states without manual SQL construction.

What is the best way to analyze UI jank using Perfetto traces?

To analyze UI jank with Perfetto traces, you can request calculations for total slice durations matching specific render thread patterns. This identifies performance bottlenecks across trace files using standard library schemas.

Can I extract app startup times and CPU frequency from local trace files?

Yes, you can extract app startup times and CPU frequency from local trace files. The query generation leverages pre-built Perfetto standard library modules to calculate these complex performance metrics automatically.

How do I calculate the total duration of slices named RenderThread in a trace?

To calculate total RenderThread slice duration, provide the trace file and ask the system to compute the duration of all matching slices. It generates an idempotent SQL query adhering to Perfetto schemas for execution.

Does this query generation approach support memory usage analysis for Android profiling?

Yes, this approach supports memory usage analysis for Android profiling. It translates natural language data intents into valid SQL queries to extract memory usage metrics directly from local Perfetto trace files.

What limitations exist when translating natural language to Perfetto SQL for trace analysis?

Query generation for trace analysis is limited by adherence to Perfetto Standard Library schemas and requires syntactically valid SQL execution. Complex intents must map to existing schema structures to yield accurate performance metrics.