pprof
pprof copied to clipboard
Colorize weblist output
This is my first try at solving #218 (and also first time contributing here 😄)
This is how it looks:
I have added 5 new CSS classes whose background-colors are from a red to yellow gradient (please feel free to criticize my color choices) I am not sure if I should use flatSum or cumSum in order to calculate the percentile, so if you have any opinion on this, please let me know.
I can add some basics tests for the calculatePercentile function, if needed.
As you may have noticed I have some failing tests because of the different html output for weblist. Is there a way of updating the testdata easily?
Codecov Report
Merging #271 (3e3a1c0) into master (3ec35eb) will increase coverage by
0.10%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #271 +/- ##
==========================================
+ Coverage 67.14% 67.25% +0.10%
==========================================
Files 78 78
Lines 14084 14130 +46
==========================================
+ Hits 9457 9503 +46
Misses 3792 3792
Partials 835 835
Impacted Files | Coverage Δ | |
---|---|---|
internal/report/source_html.go | 0.00% <ø> (ø) |
|
internal/report/source.go | 82.68% <100.00%> (+1.27%) |
:arrow_up: |
.../github.com/google/pprof/internal/report/source.go | 82.68% <0.00%> (+1.27%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3ec35eb...3e3a1c0. Read the comment docs.
Looks like test fail at formatting check.
@aalexand solved 😄 I was sleeping so I couldn't fix it straight away.
@Maaarcocr Could you address the PR comments?
@aalexand Sorry for the delay. I've been ill and I had a lot of coursework in the meanwhile, I will address the comments either today or tomorrow.
@aalexand I've changed the code based on your suggested changes.
I was wondering if I should change the background-color in a different way, such as: In getPtileCSSClassName I could instead produce a style string and we wouldnt not use classes anymore. This way, if we want to add more percentiles we would not need to manually change the HTML.
Hi! I would love to get this merged if it is still something that the project need :smile:
@aalexand any progress this PR...? would be great feature I think.
@zchee the branch is out of date so the author will need to rebase it first.
@aalexand Ah, your correct.
@Maaarcocr could you rebase it?
Sorry for the very delayed answer. Will try to rebase when I have some free time, hopefully this weekend!
still not merged?