Skip to content
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

Use Grafana flamegraph component #2346

Merged
merged 12 commits into from
Sep 27, 2023
Merged

Use Grafana flamegraph component #2346

merged 12 commits into from
Sep 27, 2023

Conversation

aocenas
Copy link
Member

@aocenas aocenas commented Aug 31, 2023

Changes the flamegraph component to use the one from grafana:
Screenshot 2023-09-20 at 15 17 36

At this moment this still contains all the old flamegraph code and uses a switch in features.ts isGrafanaFlamegraphEnabled to enable one or the other.

@CLAassistant
Copy link

CLAassistant commented Aug 31, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aocenas aocenas marked this pull request as ready for review September 20, 2023 13:18
@aocenas aocenas requested a review from a team as a code owner September 20, 2023 13:18
@petethepig
Copy link
Member

Looking food so far. I found a couple of issues though:

  • z issue with search vs dropdown
Screenshot 2023-09-20 at 1 50 11 PM
  • extra new line in the tooltip
Screenshot 2023-09-20 at 1 51 39 PM
  • also in the previous screenshot I selected CPU profiles and the new tooltip does not show the right units. I expected to see duration, e.g here's how it looks in the old UI:
Screenshot 2023-09-20 at 1 53 48 PM

@Rperry2174
Copy link
Contributor

Rperry2174 commented Sep 25, 2023

Also noticed we lost the percentages and proper units for the flamegraphs and table

Screenshot 2023-09-24 at 10 58 19 PM Screenshot 2023-09-24 at 10 52 01 PM

@aocenas
Copy link
Member Author

aocenas commented Sep 25, 2023

Added fixes for the units here. The css fixes need to be in flamegraph so have separate PR here grafana/grafana#75369.

@Rperry2174 U think the percentages are just hidden because the view is too narrow and the table is then horizontally scrollable this is what I see:
Screenshot 2023-09-25 at 15 18 06

@Rperry2174
Copy link
Contributor

found another edge case -- when diff selected and one side doesn't have data it creates this weird black flamegraph. Might be better to handle this case outside of the component and prompt user to make a valid selection but might mean something should be handled inside the component to never get in this "black and white" state

image

@Rperry2174
Copy link
Contributor

Can we add more padding between the table and the flamegraph. I think make the flamegraph slightly smaller (since table is already cramped for space)
image

@Rperry2174
Copy link
Contributor

Rperry2174 commented Sep 25, 2023

For diffs

  • Tooltip inner content should take up the full width of the tooltip
  • Tooltip itself should have a (at least a min-width=400px for diffs)
  • numeric columns should be wide enough where they never overflow to the next line like below:
38
%
Screenshot 2023-09-25 at 7 11 01 AM image

@Rperry2174
Copy link
Contributor

what are these bright white nodes? Despite them not having content and seeming to be the least important they stand out the most. They should either be a dimmer color (like the dark grey) or we should emphasize them if they are important.

Screenshot 2023-09-25 at 7 11 20 AM

@aocenas
Copy link
Member Author

aocenas commented Sep 26, 2023

@Rperry2174 regarding the tooltip table, we have a bit weird styling there and it seems it hasn't it's own intrinsic size so best I can do right now is to make it's min width a bit bigger that way it should not squish text into 2 lines.

@aocenas
Copy link
Member Author

aocenas commented Sep 27, 2023

@Rperry2174 updated the flamegraph version so things should be fixed now. This is for example how the wrong diff selection looks like, which is also how currently it works in pyroscope, also it shows change in the greyed out parts, some more spacing and background for table, also units should be correct now:

Screenshot 2023-09-27 at 15 57 28

@aocenas aocenas force-pushed the aocenas/grafana-flamegraph branch from 72a054a to 7198b47 Compare September 27, 2023 15:57
Copy link
Contributor

@Rperry2174 Rperry2174 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!!! Amazing 💯

@Rperry2174 Rperry2174 merged commit f8a1a04 into main Sep 27, 2023
@Rperry2174 Rperry2174 deleted the aocenas/grafana-flamegraph branch September 27, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants