ningyougang commented on code in PR #5222:
URL: https://github.com/apache/openwhisk/pull/5222#discussion_r882354957


##########
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerPool.scala:
##########
@@ -110,7 +109,27 @@ class FunctionPullingContainerPool(
       
.emitHistogramMetric(LoggingMarkers.INVOKER_CONTAINERPOOL_MEMORY("busy"), 
memoryConsumptionOf(busyPool))
     MetricEmitter
       
.emitHistogramMetric(LoggingMarkers.INVOKER_CONTAINERPOOL_MEMORY("prewarmed"), 
memoryConsumptionOf(prewarmedPool))
+    MetricEmitter
+      
.emitHistogramMetric(LoggingMarkers.INVOKER_CONTAINERPOOL_MEMORY("warmed"), 
memoryConsumptionOf(warmedPool))
     
MetricEmitter.emitHistogramMetric(LoggingMarkers.INVOKER_CONTAINERPOOL_MEMORY("max"),
 poolConfig.userMemory.toMB)
+    val prewarmedSize = prewarmedPool.size
+    val busySize = busyPool.size
+    val warmedSize = warmedPool.size
+    val warmedPoolGroupMap = warmedPool groupBy {
+      case (_, warmedData) => (warmedData.invocationNamespace, 
warmedData.action.toString)
+    }
+    val warmedPoolResultMap: mutable.Map[(String, String), Int] = 
mutable.Map.empty[(String, String), Int]
+    warmedPoolGroupMap.foreach { data =>
+      warmedPoolResultMap += (data._1 -> data._2.size)

Review Comment:
   There is an incompatibility problem in travis test.
   
![image](https://user-images.githubusercontent.com/11749867/170429818-451b6043-3bce-4538-9d42-bd2614e72b65.png)
   
   So don't use mapValues here due to scala2.13's return value is `MapView` and 
scala2.12's return type is `Map`



-- 
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]

Reply via email to