Package io.prometheus.client.hotspot
Class MemoryPoolsExports
- java.lang.Object
-
- io.prometheus.client.Collector
-
- io.prometheus.client.hotspot.MemoryPoolsExports
-
public class MemoryPoolsExports extends Collector
Exports metrics about JVM memory areas.Example usage:
new MemoryPoolsExports().register();
jvm_memory_bytes_used{area="heap"} 2000000 jvm_memory_bytes_committed{area="nonheap"} 200000 jvm_memory_bytes_max{area="nonheap"} 2000000 jvm_memory_pool_bytes_used{pool="PS Eden Space"} 2000
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.prometheus.client.Collector
Collector.Describable, Collector.MetricFamilySamples, Collector.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.management.MemoryMXBean
memoryBean
private java.util.List<java.lang.management.MemoryPoolMXBean>
poolBeans
-
Fields inherited from class io.prometheus.client.Collector
MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
-
-
Constructor Summary
Constructors Constructor Description MemoryPoolsExports()
MemoryPoolsExports(java.lang.management.MemoryMXBean memoryBean, java.util.List<java.lang.management.MemoryPoolMXBean> poolBeans)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addMemoryAreaMetrics(java.util.List<Collector.MetricFamilySamples> sampleFamilies)
(package private) void
addMemoryPoolMetrics(java.util.List<Collector.MetricFamilySamples> sampleFamilies)
java.util.List<Collector.MetricFamilySamples>
collect()
Return all of the metrics of this Collector.-
Methods inherited from class io.prometheus.client.Collector
checkMetricLabelName, checkMetricName, doubleToGoString, register, register, sanitizeMetricName
-
-
-
-
Method Detail
-
addMemoryAreaMetrics
void addMemoryAreaMetrics(java.util.List<Collector.MetricFamilySamples> sampleFamilies)
-
addMemoryPoolMetrics
void addMemoryPoolMetrics(java.util.List<Collector.MetricFamilySamples> sampleFamilies)
-
collect
public java.util.List<Collector.MetricFamilySamples> collect()
Description copied from class:Collector
Return all of the metrics of this Collector.
-
-