HADOOP-15067. GC time percentage reported in JvmMetrics should be a gauge, not counter. Contributed by Misha Dmitriev.
(cherry picked from commit d162252d7a
)
This commit is contained in:
parent
5884b8a80a
commit
4f71c27f2e
|
@ -188,7 +188,7 @@ public class JvmMetrics implements MetricsSource {
|
|||
}
|
||||
|
||||
if (gcTimeMonitor != null) {
|
||||
rb.addCounter(GcTimePercentage,
|
||||
rb.addGauge(GcTimePercentage,
|
||||
gcTimeMonitor.getLatestGcData().getGcTimePercentage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public class TestJvmMetrics {
|
|||
verify(rb).tag(SessionId, "test");
|
||||
for (JvmMetricsInfo info : JvmMetricsInfo.values()) {
|
||||
if (info.name().equals("GcTimePercentage")) {
|
||||
verify(rb).addCounter(eq(info), anyInt());
|
||||
verify(rb).addGauge(eq(info), anyInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue