The Perfetto UI can be extended with plugins. These plugins are shipped part of Perfetto.
The guide below explains how to create a plugin for the Perfetto UI.
First we need to prepare the UI development environment. You will need to use a MacOS or Linux machine. Follow the steps below or see the Getting Started guide for more detail.
git clone https://android.googlesource.com/platform/external/perfetto/ cd perfetto ./tool/install-build-deps --ui
cp -r ui/plugins/com.example.Skeleton ui/plugins/<your-plugin-name>
Now edit ui/plugins/<your-plugin-name>/index.ts
. Search for all instances of SKELETON: <instruction>
in the file and follow the instructions.
Notes on naming:
XyzPlugin
just Xyz
.pluginId
and directory name must match.example.com
is your domain your plugin should be named com.example.Foo
.dev.perfetto.Foo
../ui/run-dev-server
ui/plugins/<your-plugin-name>/OWNERS
to include your email.hjd@google.com
as a reviewer for your CL.Plugins can extend a handful of specific places in the UI. The sections below show these extension points and give examples of how they can be used.
TBD
TBD
TBD
TBD
TBD
TBD