Utilities

Summarize Perfetto trace slices

Group completed slices from a supplied trace by name and save native CSV counts and summed durations.

Agent

overview

What perfetto-slice-summary does

Group completed slices from a supplied trace by name and save native CSV counts and summed durations.

The adapter first asks the pinned native processor for import error statistics and rejects a trace with reported errors before publishing output. Only completed slices with dur >= 0 are included. Names are grouped across tracks; nested or overlapping slice durations can add together. The nanosecond sum is not trace wall time, exclusive CPU time or a critical-path diagnosis. More than 10,000 name groups is an error.

The input must be a nonempty regular file of at most 20 MiB. Native import-stat validation and the query or conversion share a 90-second deadline. Each artifact/log has a 4 MiB check after its native process exits; these checks do not contain peak memory or disk use.

source hub.docker.com/r/nenadzaric/skills-android-perfetto-slice-summary

use cases

Where perfetto-slice-summary fits

Compare completed slice names across traces

Save one grouped CSV per supplied trace and compare counts and reported duration sums. Interpretation remains specific to the trace you supplied.

Keep file processing separate from recording

Supply an existing trace FILE. This node exposes no recording, daemon, device, remote URL, credentials or caller-written SQL.

Distinguish a valid empty trace from a parse failure

The adapter checks native import error statistics before producing output. Native fixtures cover valid-empty and malformed traces; the owned positive trace also passed a three-node platform workflow.

reference

perfetto-slice-summary inputs and flags

1 inputs
NameTypeFlagDescription
traceFILE--traceExisting local trace FILE, nonempty and at most 20 MiB.

Showing key inputs. perfetto-slice-summary exposes 1 inputs in total.

example

Run perfetto-slice-summary

perfetto-slice-summary · command
perfetto-slice-summary --trace owned.json -o summary.csv
sample output
"name","slices","total_dur_ns"
"CounterWork",1,2000000

guidance

Choosing perfetto-slice-summary

Choose this fixed grouped-CSV job when you need completed-slice counts and duration sums by name. Choose perfetto-trace-json when you need native individual events instead.

perfetto-trace-json

Sibling offline trace job. Event JSON preserves events for inspection; grouped CSV summarizes completed slices by name.

faq

perfetto-slice-summary questions

No. Supply a trace you collected separately. The node exposes no recording, device connection or daemon.

No. The registered input is one local trace FILE. The adapter uses fixed native commands and fixed SQL.

Only completed slices with dur >= 0 are included. Names are grouped across tracks; nested or overlapping slice durations can add together. The nanosecond sum is not trace wall time, exclusive CPU time or a critical-path diagnosis. More than 10,000 name groups is an error.

The input must be a nonempty regular file of at most 20 MiB. Native import-stat validation and the query or conversion share a 90-second deadline. Each artifact/log has a 4 MiB check after its native process exits; these checks do not contain peak memory or disk use.

The locally built fixture1 image passed six native cases: positive, valid empty trace, malformed trace, missing input, oversized input and refusal to overwrite a nonempty output. The same runtime also passed an owned-trace platform workflow with downloaded output and verifier checks. Public source and component notices are available through the source link.

The source link provides immutable ORAS retrieval directions and the bundle SHA-256 for the actual custom adapter, Dockerfile, fixtures, pinned Perfetto source and component notices. The native source is Perfetto v58.2 commit add693d8b338ba9599dbcbc3e300b1ab8c000897; its core license is Apache-2.0 and dependency terms are retained.

Run perfetto-slice-summary yourself

Complete downloaded CSV from an owned-trace platform run: one completed CounterWork slice totals 2,000,000 ns; the unfinished slice is excluded.

Facts on this page come from the live Trickest tool library.