-
Notifications
You must be signed in to change notification settings - Fork 164
Add endpoints for memory: absolute and relative #181
Conversation
@dcorbacho I'd say integer values (as %) is good enough. Reporting a value as 0 would indeed be weird, so I'm OK with using 1% for those cases. |
a766ae5
to
b1067ea
Compare
The relative endpoint returns a total value that seems absolute. If other numbers are meant to add up to 100, I'd say we should return 100 for
@dcorbacho WDYT? |
I think that you are right. I'll fix it now |
We've just come across this part of rabbitmq/rabbitmq-server#1259 and noticed 2 things:
|
@gerhard we can switch to floats with, say, 2 decimal places. @dcorbacho @kjnilsson WDYT? |
That would be perfect. Can this ship in 3.6 or is it a breaking change? |
2 decimal places sounds reasonable. |
@gerhard most JSON parsers should parse integers much like floats. Computations on floats can work differently depending on the language. I think it's acceptable given other changes around VM memory consumption calculations. |
Add endpoints for memory: absolute and relative
Solves #161
@michaelklishin This PR is missing the tests for relative memory, as I need confirmation of: