roPerfetto
Add custom events and heap graph captures to a Perfetto trace of your app
The roPerfetto component lets you add your own events to the Perfetto trace of your app. You can mark instantaneous events (such as a key press), events with a duration (such as a long function), scoped events, and flows of events that cross threads. You can also capture a heap graph of your app's BrightScript and SceneGraph objects.
Events you add with roPerfetto appear in the trace alongside the events that Roku OS records. You can then view and query them in the Perfetto UI.
roPerfetto events are recorded only when tracing is enabled for the app and a trace is being captured. For the requirements and the steps to enable and record a trace, see Roku app tracing (with Perfetto).
Perfetto tracing is available only for apps that run as a process. For a sideloaded app, set
run_as_process=1in the manifest.
Example: Adding a custom event to a trace
sub init()
tracer = CreateObject("roPerfetto")
tracer.instantEvent("app_started", {build: "1.4.2"})
end subSupported interfaces
Updated about 1 hour ago