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() {
2323
2424 for (GarbageCollectorMXBean gcMXBean : garbageCollectorMXBeans ) {
2525 // modify collector name replacing spaces with hyphens.
26- String gcName = gcMXBean .getName ().toLowerCase ().replace (' ' , '-' );
26+ String gcName = gcMXBean .getName ().toLowerCase ().replace (' ' , '-' ). replace ( "." , "" ) ;
2727 metrics .add (DefaultGaugeLongMetric .incrementing (name ("count" , gcName ), new Count (gcMXBean )));
2828 metrics .add (DefaultGaugeLongMetric .incrementing (name ("time" , gcName ), new Time (gcMXBean )));
2929 }
@@ -32,11 +32,11 @@ static List<Metric> createGauges() {
3232 }
3333
3434 /**
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.
3636 */
3737 private static DefaultGaugeLongMetric createTotalGcTime (List <GarbageCollectorMXBean > garbageCollectorMXBeans ) {
3838 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 ));
4040 }
4141
4242 private static MetricName name (String prefix , String gcName ) {
You can’t perform that action at this time.
0 commit comments