rk perfetto
Summary
Perfetto performance tracing for Roku devices.
Description
Record and manage Perfetto performance traces on a connected Roku device. rk perfetto runs through a live rk server when one is discovered for the current workspace; pass --local to run in the CLI instead. Both modes take the same options and print the same output. Devices are resolved from the same device store as other rk commands, and the default channel ID is dev.
Usage
rk perfetto <subcommand> [options]enable
Summary
Enable Perfetto tracing for a channel (default: dev).
Description
Enable Perfetto tracing for a sideloaded channel on the device. A successful enable is remembered for the device and channel, which lets rk perfetto start check that tracing was enabled before it records. Redeploy the app afterwards so the channel starts with tracing on.
Usage
rk perfetto enable [options]Options
| Flag | Value/type | Default | Required |
|---|---|---|---|
--device | id|ip|name (string) | the active device | no |
--host | ip|hostname (string) | — | no |
--password | password (string) | — | no |
--channel-id | id (string) | dev | no |
--device
Target device.
--host
Connect directly to device (bypasses device store).
--password
Device developer password override. Accepted for parity with other commands; the endpoints Perfetto uses are unauthenticated, so no password is required.
--channel-id
Channel ID to enable.
Example:
rk perfetto enable --channel-id 12345Examples
rk perfetto enable
rk perfetto enable --channel-id my-channelSee also
- enablePerfettoTracing (
POST /api/perfetto/enable) - perfetto_enable
start
Summary
Record a Perfetto trace (Ctrl+C to stop).
Description
Record a Perfetto trace until Ctrl+C, then save it. By default the trace is saved as trace.<esn>.<timestamp>.perfetto-trace in the CLI's current directory in local mode, or the server's project root in server mode. start refuses to run until rk perfetto enable has succeeded for the target device and channel; pass --skip-enable-check to record anyway. Only one active session per device is allowed.
Usage
rk perfetto start [options]Options
| Flag | Value/type | Default | Required |
|---|---|---|---|
--device | id|ip|name (string) | the active device | no |
--host | ip|hostname (string) | — | no |
--password | password (string) | — | no |
--open | boolean | — | no |
--output | path (string) | auto-generated | no |
--channel-id | id (string) | dev | no |
--skip-enable-check | boolean | — | no |
--device
Target device.
--host
Connect directly to device (bypasses device store).
--password
Device developer password override. Accepted for parity with other commands; the endpoints Perfetto uses are unauthenticated, so no password is required.
--open
Open trace in VS Code after recording.
--output
Output file path for trace. Relative paths use the CLI's current directory in local mode or the server's project root in server mode. In both modes, both relative and absolute output paths must stay within that base directory.
Example:
rk perfetto start --output traces/home-scroll.perfetto-trace--channel-id
Channel ID to record.
--skip-enable-check
Record even if 'perfetto enable' was never run. Use it when the remembered enable state is stale, for example after a device reboot or when tracing was enabled from a different machine.
Examples
rk perfetto start
rk perfetto start --open
rk perfetto start --output my-trace.perfetto-traceSee also
- startPerfettoTrace (
POST /api/perfetto/start) - stopPerfettoTrace (
POST /api/perfetto/stop) - perfetto_start
- perfetto_stop
Updated about 4 hours ago