summaryzb commented on a change in pull request #34749:
URL: https://github.com/apache/spark/pull/34749#discussion_r762756637
##########
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:
we should consistently apply the computation of totalGcTime both in
driver side and executor side
--
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]