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


##########
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:
   can't it just remove the type annotation?
   
   ```scala
       val warmedPoolMap = warmedPool groupBy {
         case (_, warmedData) => (warmedData.invocationNamespace, 
warmedData.action.toString)
       } mapValues (_.size)
       for((data, size) <- warmedPoolMap) {
   ```



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