-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(profiling) construct profile from continuous chunk #74171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if (m.elapsed_since_start_ns > this.domains.x[1]) { | ||
| this.domains.x[1] = m.elapsed_since_start_ns; | ||
| if (m.elapsed > this.domains.x[1]) { | ||
| this.domains.x[1] = m.elapsed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this had previously shared the type with the measurement, but was now moved to a separate field
| return new UIFrames( | ||
| { | ||
| // @TODO | ||
| // @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these need to be updated, I'm going to tackle them in the next PR
| const measurements = profileGroup.measurements[key]!; | ||
| const values: ProfileSeriesMeasurement['values'] = []; | ||
|
|
||
| let offset = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This computes the value offset to the start of the profile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to put into a helper function that takes a formatted for the value? I see it's copied for all the other charts below.
Bundle ReportChanges will increase total bundle size by 1.68kB ⬆️
|
|
|
||
| const profiles = useContinuousProfile(); | ||
| const profileGroup = useProfileGroup(); | ||
| const profileGroup = useProfileGroup() as ContinuousProfileGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this cast necessary? No way to have it return the appropriate type directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me tackle this in a separate PR with the approach we discussed (separate context and asserting data shape). We can get rid of calling useProfiles there too
| const measurements = profileGroup.measurements[key]!; | ||
| const values: ProfileSeriesMeasurement['values'] = []; | ||
|
|
||
| let offset = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to put into a helper function that takes a formatted for the value? I see it's copied for all the other charts below.
This PR implements measurements rendering for the continuous profiling UI. The chart to render slow and frozen frames still needs to be updated to reflect this.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
This PR implements measurements rendering for the continuous profiling UI.
The chart to render slow and frozen frames still needs to be updated to reflect this.