File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/io/avaje/metrics/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ static List<Metric> createGauges() {
23
23
24
24
for (GarbageCollectorMXBean gcMXBean : garbageCollectorMXBeans ) {
25
25
// modify collector name replacing spaces with hyphens.
26
- String gcName = gcMXBean .getName ().toLowerCase ().replace (' ' , '-' );
26
+ String gcName = gcMXBean .getName ().toLowerCase ().replace (' ' , '-' ). replace ( "." , "" ) ;
27
27
metrics .add (DefaultGaugeLongMetric .incrementing (name ("count" , gcName ), new Count (gcMXBean )));
28
28
metrics .add (DefaultGaugeLongMetric .incrementing (name ("time" , gcName ), new Time (gcMXBean )));
29
29
}
@@ -32,11 +32,11 @@ static List<Metric> createGauges() {
32
32
}
33
33
34
34
/**
35
- * Return a Gauge for the total GC time. Gives us a single metric to measure aggregate GC activity.
35
+ * Return a Gauge for the total GC time in millis . Gives us a single metric to measure aggregate GC activity.
36
36
*/
37
37
private static DefaultGaugeLongMetric createTotalGcTime (List <GarbageCollectorMXBean > garbageCollectorMXBeans ) {
38
38
GarbageCollectorMXBean [] gcBeans = garbageCollectorMXBeans .toArray (new GarbageCollectorMXBean [0 ]);
39
- return DefaultGaugeLongMetric .incrementing (new DefaultMetricName ("jvm.gc.timeTotal " ), new TotalTime (gcBeans ));
39
+ return DefaultGaugeLongMetric .incrementing (new DefaultMetricName ("jvm.gc.time " ), new TotalTime (gcBeans ));
40
40
}
41
41
42
42
private static MetricName name (String prefix , String gcName ) {
You can’t perform that action at this time.
0 commit comments