-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add dynamic labels to the wall profiler #73
Add dynamic labels to the wall profiler #73
Conversation
8000fed
to
335d3f4
Compare
335d3f4
to
c44b155
Compare
This adds dyanmic labels for wall profiling.
c44b155
to
ee134da
Compare
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.
LGTM
...oldLabels, | ||
...lbls, | ||
}) | ||
;(fn as AnyWrappedCallback)(...args) |
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 semicolon necessary?
;(fn as AnyWrappedCallback)(...args) | |
(fn as AnyWrappedCallback)(...args) |
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.
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.
Yes it is; it separates the statements.
If not, the JS engine tries to use the return value of setLabels
as a function that will receive the fn
parameter.
Adding or not semicolons at the end of each line of JS code can be debated.
But for sure, not having them can create this confusion. Maybe we should configure Prettier to format the code automatically (in a future PR).
Co-authored-by: Bryan Huhta <[email protected]>
This PR add dynamic labels to the wall profiler. This includes a wrapper for ensuring labels are set while a function executed.
I have also extended the test to measure how this feature works on a real profile.