uber-common / jvm-profiler

JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter
Other
1.78k stars 342 forks source link

Documentation for metrics collected #72

Closed m-vemuri closed 4 years ago

m-vemuri commented 4 years ago

Summary:

This ticket is a suggestion for improving the documentation by adding a description of the metrics collected by the profiler.

Details:

As noted in https://github.com/uber-common/jvm-profiler/issues/50, there is currently no documentation describing the metrics that are collected. Adding a description of what each collected metric represents to the documentation might add value by:

  1. Creating a quick reference for developers.
  2. Increasing the usability of the repository/profiler.

The recommendation is to add something along the lines of the sample below.

Name Description Sample Value Note
bufferPools-direct-totalCapacity Available capacity in bytes in the direct buffer pool. 18949 Capacity should be similar to memoryUsed for a healthy JVM.
gc-PSMarkSweep-collectionCount Total number of collections that have occurred for PS MarkSweep. 7 -1 if collection count is undefined for this collector.


Relevant Branch:

I have started some work on this, which can be found here. The information provided in the mark-down is based on the source code of the profiler, the java.lang documentation of the APIs that are used by the profiler and personal knowledge.

The documentation linked above is incomplete since I wanted to ensure that this change is acceptable before spending more time on it.

jodom961 commented 4 years ago

thanks for throwing this together... the branch really helped me! Hope it gets further looks from the uber team so people don't have to search git issues for it 👍

hiboyang commented 4 years ago

Great, thanks @m-vemuri for writing the doc! Would you like to submit a pull request to this repo so I could merge it?

m-vemuri commented 4 years ago

Thanks @jodom961. Glad it was useful and helpful.

@boy-uber sure thing. I'll submit a pull request once its completed.

hiboyang commented 4 years ago

Sounds good, thanks :)

m-vemuri commented 4 years ago

@boy-uber I have created PR https://github.com/uber-common/jvm-profiler/pull/79.

hiboyang commented 4 years ago

Merged PR.