tree: f15ccadbe436472c755d8210170eea6e59faaa03 [path history] [tgz]
  1. meta/

Example C++ Trace Provider

This directory contains a simple C++ trace provider that demonstrates setting up a trace provider and emitting the various types of trace events.

Building and Running

To build and run this example add to your fx set command:

fx set <...> --with //src/performance/example_trace_provider

After fx building and running fx serve, start the component:

ffx component run /core/ffx-laboratory:example_trace_provider 'fuchsia-pkg://'


Now we can take a trace of our component:

ffx trace start --duration 2 --categories "example"

The trace will be saved to trace.fxt in the current directory and you can upload it to to view the trace.