Skip to content

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Jul 11, 2024

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.

@JonasBa JonasBa requested a review from a team as a code owner July 11, 2024 21:08
@JonasBa JonasBa requested a review from a team July 11, 2024 21:08
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 11, 2024
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;
Copy link
Member Author

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
Copy link
Member Author

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;
Copy link
Member Author

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

Copy link
Member

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.

@codecov
Copy link

codecov bot commented Jul 11, 2024

Bundle Report

Changes will increase total bundle size by 1.68kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 27.96MB 1.68kB ⬆️


const profiles = useContinuousProfile();
const profileGroup = useProfileGroup();
const profileGroup = useProfileGroup() as ContinuousProfileGroup;
Copy link
Member

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?

Copy link
Member Author

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;
Copy link
Member

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.

Base automatically changed from jb/profiling/chart-rendering to master July 15, 2024 13:44
@JonasBa JonasBa merged commit 7f57483 into master Jul 15, 2024
@JonasBa JonasBa deleted the jb/profiling/chart-measurements branch July 15, 2024 14:21
priscilawebdev pushed a commit that referenced this pull request Jul 16, 2024
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.
@sentry
Copy link

sentry bot commented Jul 17, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: ProfileGroup is not of continuous profile type. /profiling/profile/:projectId/flamegraph/ View Issue
  • ‼️ Error: ProfileGroup is not of continuous profile type. /profiling/profile/:projectId/flamegraph/ View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants