autumnust commented on a change in pull request #2864: GOBBLIN-1018: Report GC
counts and durations from Gobblin containers …
URL: https://github.com/apache/incubator-gobblin/pull/2864#discussion_r366541788
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/ContainerHealthMetricsService.java
##########
@@ -94,35 +133,75 @@ protected void runOneIteration() throws Exception {
this.totalSwapSpaceSize.set(this.operatingSystemMXBean.getTotalSwapSpaceSize());
this.freePhysicalMemSize.set(this.operatingSystemMXBean.getFreePhysicalMemorySize());
this.processHeapUsedSize.set(this.memoryMXBean.getHeapMemoryUsage().getUsed());
+
+ GcStats gcStats = collectGcStats();
+ //Since GC Beans report accumulated counts/durations, we need to subtract
the previous values to obtain the counts/durations
+ // since the last measurement time.
+ this.minorGcCount.set(gcStats.getMinorCount() - this.minorGcCount.get());
Review comment:
Just curious, when printed, do we have any mention of this duration ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services