-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the tags command, print percentages relative to profile total. (#929)
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.
- Loading branch information
Showing
8 changed files
with
59 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
key1: Total 1.1s | ||
1.0s (89.29%): tag1 | ||
100.0ms ( 8.93%): tag2 | ||
10.0ms ( 0.89%): tag3 | ||
10.0ms ( 0.89%): tag4 | ||
key1: Total 1.12s of 1.12s ( 100%) | ||
1s (89.29%): tag1 | ||
100ms ( 8.93%): tag2 | ||
10ms ( 0.89%): tag3 | ||
10ms ( 0.89%): tag4 | ||
|
||
key2: Total 1.0s | ||
1.0s (99.02%): tag1 | ||
10.0ms ( 0.98%): tag2 | ||
key2: Total 1.02s of 1.12s (91.07%) | ||
1.01s (90.18%): tag1 | ||
10ms ( 0.89%): tag2 | ||
|
||
key3: Total 100.0ms | ||
100.0ms ( 100%): tag2 | ||
key3: Total 100ms of 1.12s ( 8.93%) | ||
100ms ( 8.93%): tag2 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
key1: Total 100.0ms | ||
100.0ms ( 100%): tag2 | ||
key1: Total 100ms of 1.12s ( 8.93%) | ||
100ms ( 8.93%): tag2 | ||
|
||
key3: Total 100.0ms | ||
100.0ms ( 100%): tag2 | ||
key3: Total 100ms of 1.12s ( 8.93%) | ||
100ms ( 8.93%): tag2 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
bytes: Total 98.6MB | ||
62.5MB (63.37%): 1.56MB | ||
31.2MB (31.68%): 400kB | ||
3.9MB ( 3.96%): 200kB | ||
1000.0kB ( 0.99%): 100kB | ||
bytes: Total 98.63MB of 98.63MB ( 100%) | ||
62.50MB (63.37%): 1.56MB | ||
31.25MB (31.68%): 400kB | ||
3.91MB ( 3.96%): 200kB | ||
1000kB ( 0.99%): 100kB | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
bytes: Total 103424000.0B | ||
65536000.0B (63.37%): 1638400B | ||
32768000.0B (31.68%): 409600B | ||
4096000.0B ( 3.96%): 204800B | ||
1024000.0B ( 0.99%): 102400B | ||
bytes: Total 103424000B of 103424000B ( 100%) | ||
65536000B (63.37%): 1638400B | ||
32768000B (31.68%): 409600B | ||
4096000B ( 3.96%): 204800B | ||
1024000B ( 0.99%): 102400B | ||
|
8 changes: 8 additions & 0 deletions
8
internal/driver/testdata/pprof.heap_request.relative_percentages.tags.focus
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
bytes: Total 93.75MB of 93.75MB ( 100%) | ||
62.50MB (66.67%): 1.56MB | ||
31.25MB (33.33%): 400kB | ||
|
||
request: Total 93.75MB of 93.75MB ( 100%) | ||
62.50MB (66.67%): 1.56MB | ||
31.25MB (33.33%): 400kB | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
bytes: Total 93.8MB | ||
62.5MB (66.67%): 1.56MB | ||
31.2MB (33.33%): 400kB | ||
bytes: Total 93.75MB of 98.63MB (95.05%) | ||
62.50MB (63.37%): 1.56MB | ||
31.25MB (31.68%): 400kB | ||
|
||
request: Total 93.8MB | ||
62.5MB (66.67%): 1.56MB | ||
31.2MB (33.33%): 400kB | ||
request: Total 93.75MB of 98.63MB (95.05%) | ||
62.50MB (63.37%): 1.56MB | ||
31.25MB (31.68%): 400kB | ||
|
This file contains 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