Eli Perelman wrote:
> The idea, at least for the devtools visualization, would be for markers and
> measurements that occur in different processes to be displayed on the
> existing timeline. For example, if I create a marker in the System app that
> is linked to an action that occured in the Contacts app, that marker should
> be displayed in the Contacts timeline. Likewise if I create a linked
> measurement in verticalhome and System that is contextually bound to
> another app, it should display as a duration in that app's timeline.
>
> For performance testing, it's pretty much the same concept, but we need the
> data to be compatible between processes. If an app creates a timestamp
> using performance.now(), and the System does the same, there isn't
> currently a mechanism that we can use to compare the deltas between the two
> timestamps. Having a way to link markers will let us compare
> high-resolution timestamps across processes.
>
> Does that makes sense?
Right. The devtools can only show data coming from one process, and there's
no plan to aggregate data from different app/process.
So the aggregation needs to be done at the platform level or at the app level.
Whatever API and mechanism you choose, if you want the markers to show-up in
the devtools, the only thing you need is to call:
If it has a duration:
docShell->AddProfileTimelineMarker("aMarkerID", TRACING_INTERVAL_START);
docShell->AddProfileTimelineMarker("aMarkerID", TRACING_INTERVAL_END);
Or if it's one-time event:
docShell->AddProfileTimelineMarker("aMarkerID", TRACING_EVENT);
docShell being the top level docshell of the app.
-- Paul