summaryzb commented on a change in pull request #34749:
URL: https://github.com/apache/spark/pull/34749#discussion_r762757777
##########
File path: core/src/main/scala/org/apache/spark/metrics/ExecutorMetricType.scala
##########
@@ -137,7 +138,9 @@ case object GarbageCollectionMetrics extends
ExecutorMetricType with Logging {
override private[spark] def getMetricValues(memoryManager: MemoryManager):
Array[Long] = {
val gcMetrics = new Array[Long](names.length) // minorCount, minorTime,
majorCount, majorTime
- ManagementFactory.getGarbageCollectorMXBeans.asScala.foreach { mxBean =>
+ val mxBeans = ManagementFactory.getGarbageCollectorMXBeans.asScala
+ gcMetrics(4) = mxBeans.map(_.getCollectionTime).sum
Review comment:
since the totalGCTime of the real executor apply the sum of all
collectionTime
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]