Add TM GC CPU fraction to stat endpoint#3002
Conversation
|
Refer to this link for build results (access rights to CI server needed): |
ezelkow1
left a comment
There was a problem hiding this comment.
Looks good, GCCPUfraction has been around since go1.5 and could be helpful to monitor usage
dneuman64
left a comment
There was a problem hiding this comment.
I know @ezelkow1 took a look at the code changes here, but I think this PR would benefit from a test or two.
It looks like there currently isn't any tests for this Stats struct (if there is, why didn't get get updated?), so I think our code would benefit from at least a test of the struct.
IMO Traffic Monitor is light on tests as is, and this seems like a good time to add some. It would definitely help future developers.
As required by PR Review.
ab0a1a7 to
7140940
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Thanks Rob! I know it can be a PITA do to tests, and it's frustrating when you have to write a test after changing one little thing. I am definitely not "unit test guy" but I think even a little test like this can make our products better and make the lives of future developers much easier. I appreciate you writing the test. |
What does this PR do?
Adds TM GC CPU fraction to stat endpoint, for debugging and profiling.
Which TC components are affected by this PR?
What is the best way to verify this PR?
Run Monitor, verify
/publish/Statsendpoint hasgc-cpu-fractionkey.Check all that apply