Expose HitCount and HitLineCount to CPUProfileNode#285
Open
mnutt wants to merge 1 commit intorogchap:masterfrom
Open
Expose HitCount and HitLineCount to CPUProfileNode#285mnutt wants to merge 1 commit intorogchap:masterfrom
mnutt wants to merge 1 commit intorogchap:masterfrom
Conversation
genevieve
reviewed
Mar 9, 2022
| columnNumber int | ||
|
|
||
| // The number of samples recorded in the function | ||
| hitCount uint |
Collaborator
There was a problem hiding this comment.
Would you be open to using the comment from the v8 header file for these?
i.e.
// The count of samples where the function was currently executing.
hitCount uint
// The number of the function's source lines that collect the samples.
hitLineCount uint
genevieve
reviewed
Mar 9, 2022
| // Returns total number of lines inside the function recording samples | ||
| func (c *CPUProfileNode) GetHitLineCount() uint { | ||
| return c.hitLineCount | ||
| } |
Collaborator
|
The changes look good.
|
Codecov Report
@@ Coverage Diff @@
## master #285 +/- ##
==========================================
- Coverage 95.86% 95.54% -0.32%
==========================================
Files 17 17
Lines 580 584 +4
==========================================
+ Hits 556 558 +2
- Misses 15 17 +2
Partials 9 9
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This exposes hitCount and hitLineCount from v8's cpuprofile node. It's useful in order to be able to see relative percentages of time spent in a v8 function and its descendants, although computing total time is left up to the presentation implementation.
Sample implementation: