Skip to content

Commit

Permalink
HADOOP-19371. JVM GC Metrics supports ZGC pause time and count (#7230)…
Browse files Browse the repository at this point in the history
… Contributed by cxzl25.

Reviewed-by: Tao Li <[email protected]>
Reviewed-by: Cheng Pan <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
  • Loading branch information
cxzl25 authored Dec 25, 2024
1 parent 3bf43b4 commit ecc4e00
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ private void getGcUsage(MetricsRecordBuilder rb) {
long count = 0;
long timeMillis = 0;
for (GarbageCollectorMXBean gcBean : gcBeans) {
if (gcBean.getName() != null) {
String name = gcBean.getName();
// JDK-8265136 Skip concurrent phase
if (name.startsWith("ZGC") && name.endsWith("Cycles")) {
continue;
}
}
long c = gcBean.getCollectionCount();
long t = gcBean.getCollectionTime();
MetricsInfo[] gcInfo = getGcInfo(gcBean.getName());
Expand Down

0 comments on commit ecc4e00

Please sign in to comment.