Skip to content

Render memory values in a human-readable format #4863

@cdprete

Description

@cdprete

Hello.

Enhancement
It would be great if the heap and non-heap memory values returned by the ProcessInfoContributor would be rendered in a human-readable format. For example: 1MB instead of 1048576.
I'm referring to the values in red below:

Image

Of course, when -1 is returned then it stays like it is.

Please make sure to validate the format of the response returned by such info contributor before trying to decorate it.
I say this because, for non-Java applications, I've actually developed an agent-like application instead that monitors the native process (that's how I realised that the sorting is broken in #4341) and for the same contributor returns a response like:

Image

Of course, I don't expect my custom format to be supported.
Unless, as a possibility, you may try to render as human-readable every integral value that gets returned under (reaching the leafs of the tree object) the memory entry.
This would cover both the use cases transparently but, I can easily imagine, it requires more effort from your side.

Ignore the statement above. The garbageCollectors entry is also under memory and it shouldn't be touched, so that's not as easy as anticipated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions