Skip to content

In the tags command, print percentages relative to profile total.#929

Merged
aalexand merged 1 commit intogoogle:mainfrom
aalexand:unktags
Feb 8, 2025
Merged

In the tags command, print percentages relative to profile total.#929
aalexand merged 1 commit intogoogle:mainfrom
aalexand:unktags

Conversation

@aalexand
Copy link
Collaborator

@aalexand aalexand commented Feb 8, 2025

Before this change percentages were relative to the tag total and this sometimes causes confusion for users as it makes it look like the tag is set for all samples when it's not.

Note that the percentage calculation as implemented does not attempt to be friendly to samples where a given tag has multiple values. Multiple values per tag per sample are discouraged and we should deprecate them. Maybe we should make pprof print a warning for such profiles.

@aalexand aalexand requested a review from ghemawat February 8, 2025 17:55
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.

Project coverage is 66.91%. Comparing base (0ed6a68) to head (4a63a5c).
Report is 65 commits behind head on main.

Files with missing lines Patch % Lines
internal/report/report.go 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
+ Coverage   66.86%   66.91%   +0.04%     
==========================================
  Files          44       44              
  Lines        9824     9871      +47     
==========================================
+ Hits         6569     6605      +36     
- Misses       2794     2827      +33     
+ Partials      461      439      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Before this change percentages were relative to the tag total and this
sometimes causes confusion for users as it makes it look like the tag is
set for all samples when it's not.

Note that the percentage calculation as implemented does not attempt to
be friendly to samples where a given tag has multiple values. Multiple
values per tag per sample are discouraged and we should deprecate them.
Maybe we should make pprof print a warning for such profiles.
Copy link
Contributor

@ghemawat ghemawat left a comment

Choose a reason for hiding this comment

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

Looks good.

@aalexand aalexand merged commit a522070 into google:main Feb 8, 2025
49 checks passed
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.

3 participants