--- id: perfetto version: "0.57.2" license: apache-2.0 license_treatment: permissive maintenance: active --- # perfetto — Python APIs and bindings for Perfetto (perfetto.dev) License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does Perfetto is a Python interface to Perfetto's trace processor, enabling programmatic analysis of system and application performance traces. It lets you load trace files and query them using SQL, making it possible to automate trace analysis, extract custom metrics, and integrate trace inspection into Python workflows. The package is built on top of Perfetto's production-grade tracing infrastructure, which is the default system for Android and Chromium. The package depends only on protobuf and installs as a pure Python wheel, making it lightweight to add to existing projects. It's designed for developers, performance engineers, and SREs who need to analyze traces captured by Perfetto daemons or other compatible tools—such as Linux perf, Chrome JSON traces, or macOS Instruments—without manually parsing binary formats. Use it for: - Automate analysis of Android app performance traces to detect slow startups, dropped frames, or memory issues - Query Linux kernel traces to analyze scheduling behavior, syscalls, and CPU performance bottlenecks - Extract custom metrics from Chromium browser traces for performance regression detection - Batch-process multiple trace files to generate performance reports and SRE dashboards - Integrate trace analysis into CI/CD pipelines to flag performance regressions automatically ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Perfetto is a Python binding for Perfetto's trace processor, allowing programmatic access to system and application traces via SQL queries and trace analysis APIs. Yes, if you need to programmatically analyze Perfetto traces or other compatible trace formats. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The alpha status means the API may change, so pin the version in production. Not necessary if you only need the browser-based UI or one-off manual trace inspection. ## Install pip install perfetto uv add perfetto poetry add perfetto ## Installing perfetto Before you install: Low install friction with a single runtime dependency (protobuf). Active maintenance with recent releases; last commit 2026-08-14 and version 0.57.2 released 2026-07-07. Alpha status indicates the API may still evolve. License in practice: Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install perfetto import perfetto # Load and query a trace file processor = perfetto.TraceProcessor(trace_file='trace.perfetto-trace') result = processor.query('SELECT * FROM sched_slice LIMIT 10') Verify before relying: - Whether the Python package provides direct access to all Perfetto trace processor features or a subset - Whether traces must be pre-captured by Perfetto daemons or if the package can initiate tracing - Performance characteristics when querying large multi-GB trace files - Whether the package works on Windows, macOS, and Linux or has platform-specific limitations ## Package facts - License: apache-2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags trace analysis python, perfetto trace processor, system profiling traces, performance trace querying, trace visualization data, sql trace analysis, android tracing python, performance-analysis, trace-processing, system-profiling [View on SkillFed](https://skillfed.io/packages/perfetto) · [View on PyPI](https://pypi.org/project/perfetto/)