Skip to content

Fix broken overlapping measures in Perfetto integration#45567

Closed
rubennorte wants to merge 2 commits into
facebook:mainfrom
rubennorte:export-D60010696
Closed

Fix broken overlapping measures in Perfetto integration#45567
rubennorte wants to merge 2 commits into
facebook:mainfrom
rubennorte:export-D60010696

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [internal]

(internal because our integration for Perfetto hasn't been released in OSS yet)

In our current React integration for Perfetto we're logging arbitrary time spans via performance.measure in specific tracks (that can be custom based on a naming scheme).

For a given track, Perfetto doesn't allow partially overlapping segments (as it's considered to always be a stack of time spans). When logging arbitrary time spans that partially overlap, Perfetto cuts the nested ones to make sure they fit into their suspected parent. This makes the logged data incorrect and makes it hard to understand the performance of an application using this data.

There's a fix for this problem: logging these arbitrary segments/time spans in separate tracks that only share the name. In this case, Perfetto groups the data in the UI but allows overlapping (as they're not really on the same track).

Differential Revision: D60010696

rubennorte and others added 2 commits July 22, 2024 02:08
Summary:
Changelog: [internal]

(internal because our integration for Perfetto hasn't been released in OSS yet)

In our current React integration for Perfetto we're logging arbitrary time spans via `performance.measure` in specific tracks (that can be custom based on a naming scheme).

For a given track, Perfetto doesn't allow partially overlapping segments (as it's considered to always be a stack of time spans). When logging arbitrary time spans that partially overlap, Perfetto cuts the nested ones to make sure they fit into their suspected parent. This makes the logged data incorrect and makes it hard to understand the performance of an application using this data.

There's a fix for this problem: logging these arbitrary segments/time spans in separate tracks that only share the name. In this case, Perfetto groups the data in the UI but allows overlapping (as they're not really on the same track).

Differential Revision: D60010696
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 22, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60010696

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 43c32e1.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants