-
Notifications
You must be signed in to change notification settings - Fork 453
Add a Focus Self transform #5774
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
base: main
Are you sure you want to change the base?
Conversation
d18cff3 to
62f75cd
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5774 +/- ##
==========================================
- Coverage 85.71% 85.68% -0.03%
==========================================
Files 317 317
Lines 31216 31264 +48
Branches 8499 8602 +103
==========================================
+ Hits 26756 26790 +34
- Misses 4030 4044 +14
Partials 430 430 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fec7650 to
c470427
Compare
locales/en-US/app.ftl
Outdated
| .title = { CallNodeContextMenu--transform-focus-function-title } | ||
| CallNodeContextMenu--transform-focus-function-inverted = Focus on function (inverted) | ||
| .title = { CallNodeContextMenu--transform-focus-function-title } | ||
| CallNodeContextMenu--transform-focus-self-title = |
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.
Do we expect self to be translated?
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.
Depends on how the call tree's "Self" column is translated. I've added the following note, does that work?
# The translation for "self" in this string should match the translation used
# in CallTree--samples-self and CallTree--bytes-self. Alternatively it can be
# translated as "self values" or "self time" (though "self time" is less desirable
# because this menu item is also shown in "bytes" mode).
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.
The note works, but we should add it also for the previous string. You can use a group-level comment (2 hashes), and reset it after this string.
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.
done
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.
er wait, I did it wrong
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.
sorry about that, should be good now
This transform avoids the need to drop callees manually if you want to see a flame graph for a single JS function but no other JS functions; with this transform, you can focus on the function's self while you're in the JS-only view, and then go back to the combined view to see any native functions involved in the execution of that JS function.
4eb37eb to
5450567
Compare
| # $item (String) - Name of the function that transform applied to. | ||
| TransformNavigator--focus-function = Focus: { $item } | ||
| # "Focus self" transform. |
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.
Same here, worth adding a short note on "self" (no need for it to be as long as the other).
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.
Fixed, how does this look?
5450567 to
5d63c03
Compare
5d63c03 to
7299b85
Compare
flodolo
left a comment
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.
Looks good.
Deploy preview
This transform avoids the need to drop callees manually if you want to see a flame graph for a single JS function but no other JS functions. With this transform, you can focus on the function's self while you're in the JS-only view, and then go back to the combined view to see any native functions involved in the execution of that JS function.
For example, in this profile, you can "focus self" on
HTMLElement.click, and then change the implementation filter to "All Frames". This will show you the overhead on the way to calling the click handler, minus the time spent in the called JS code (profile). If you had just done "focus function" onHTMLElement.click, you would have seen all the time spent in callees too (profile), and you would have needed to drop each JS callee manually.