statsviz icon indicating copy to clipboard operation
statsviz copied to clipboard

Support display custom data

Open wuhelong opened this issue 2 years ago β€’ 3 comments

wuhelong avatar Jan 08 '22 09:01 wuhelong

Hey @wuhelong Thank you for the great contribution. I really like the approach you took, it's clean and efficient. I haven't had much time to give to statsviz recently but this is coming to an end.

What I have in mind for statsviz, and I'm sharing it with you here since there's a lot of overlap with your pull-request, is for the web code (js/html) to be 100% decoupled from Go runtime metrics. Said differently, I'd like to be able to plot whatever metrics ("normal" plots and heatmaps as well), and maybe put that part in another Go module from which Statsviz would depend for the plotting part.

This would allow to easily support additional custom metrics (in the same fashion as you're proposing) as well as making Statsviz support out of the box all current and future metrics from the recent runtime/metrics standard package.

So, I might not merge this as-is, but instead reuse some part of your code. When/If ' I do that, I'll make sure to reference you as a contributor. Thank you

arl avatar Feb 06 '22 11:02 arl

Codecov Report

Merging #62 (3bd32b3) into main (d96a9a9) will decrease coverage by 5.60%. The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
- Coverage   97.91%   92.30%   -5.61%     
==========================================
  Files           3        3              
  Lines          48       52       +4     
==========================================
+ Hits           47       48       +1     
- Misses          1        2       +1     
- Partials        0        2       +2     
Impacted Files Coverage Ξ”
statsviz.go 71.42% <25.00%> (-18.58%) :arrow_down:

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 d96a9a9...3bd32b3. Read the comment docs.

codecov[bot] avatar Feb 06 '22 11:02 codecov[bot]

Your idea is very good. I submitted new code to fix some issues.

wuhelong avatar Feb 09 '22 12:02 wuhelong

Hey @wuhelong I've released today a new version v0.5.0. That's close to be a full rewrite. As such your pull-request would also have to be totally rewritten to account for the changes.

It's not yet possible to add custom metrics, however, that's a feature that I had in mind in the rewrite. It's going to be easier to do that since the list of plots is not dynamically defined in Go code, and the html/js part doesn't know about, it just renders what has been defined in Go.

I haven't got the time to do that ye though.

I'm gonna close the pull-request. Stay tuned and thank you for your interest in this project

arl avatar Sep 05 '22 12:09 arl