-
Notifications
You must be signed in to change notification settings - Fork 96
Setting up a local copy of the UI
magic-trace can, but does not by default, serve its own UI after it takes a trace. That saves you from having to scp
trace files around, at the cost of having to build the UI and then keep it around somewhere.
Besides being convenient, a local UI is also handy if you don't trust that our hosted version is entirely client-sided, or if it's unavailable.
The site only builds on Linux machines.
- Clone our github repo
git clone https://github.com/janestreet/perfetto.git
cd perfetto
- Build it
tools/install-build-deps --ui
ui/build
- The site was generated in
out/ui/ui/dist
. Renamedist
toui
, and move it into shared filesystem somewhere if you want to make it available to your whole company.
You need to point magic-trace at wherever you built that site. Do so by setting the environment variable MAGIC_TRACE_PERFETTO_DIR=/path/to/wherever/you/put/ui
. You'll know you did this right if the output of ls -1 $MAGIC_TRACE_PERFETTO_DIR/ui
looks something like:
favicon.png
index.html
service_worker.js
service_worker.js.map
v25.0-f53c1d9ef
The hash may be different.
Setting that environment unlocks a new command line argument: -serve
, which you can use to change the port on which Perfetto is served.