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

POC: Add more colours #121

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

elenatanasoiu
Copy link

@elenatanasoiu elenatanasoiu commented Jan 17, 2025

@keithamus and I paired on a POC for this.

The colours are totally random right now, but this was a fun little foray into making Vernier look more like speedscope. Looking for feedback.

Screenshot 2025-01-17 at 13 15 52

Example JSON profile:
pickles.json

How to get a JSON profile with colours:

bin/vernier run exe/vernier
gzip -d <your-profile.zip>

The list of available colours is here:
https://github.com/firefox-devtools/profiler/blob/9175e2462bedd013adcf97acb28bda50c54791a9/src/utils/colors.js#L103-L175

Co-authored-by: Keith Cirkel <[email protected]>
@elenatanasoiu elenatanasoiu changed the title colours POC: Add more colours Jan 17, 2025
@joshuay03 joshuay03 force-pushed the keith-elena/colours branch from 732a9ec to fe87e37 Compare January 19, 2025 07:48
@joshuay03 joshuay03 requested a review from jhawthorn January 19, 2025 08:27
Makes the logic simpler. We initially made this a special check at the
start as it would be confused with cfunc.

But I can see there are spans further down in the stack like "Array#each"
that will be detected as "Kernel" so I think it's ok to just treat this
"Kernel" category as all the other ones.

This matches what speedscope does as well.
@elenatanasoiu
Copy link
Author

Did a bit of refactoring to extract the nested if statements into methods. And changed some colours.

Here's a fresh profile:

Screenshot 2025-01-20 at 16 59 33

pickles.vernier.json

@elenatanasoiu
Copy link
Author

elenatanasoiu commented Jan 20, 2025

Thanks for fixing the failing CI @joshuay03! 🙇‍♀️

Copy link
Collaborator

@joshuay03 joshuay03 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. I like this, but I’ll leave the approval (specifically regarding the choice of colours) to @jhawthorn

lib/vernier/output/firefox.rb Outdated Show resolved Hide resolved
lib/vernier/output/firefox.rb Show resolved Hide resolved
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.

2 participants