zuston commented on code in PR #2500:
URL: https://github.com/apache/uniffle/pull/2500#discussion_r2142029844


##########
client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala:
##########
@@ -102,11 +102,23 @@ class ShufflePage(parent: ShuffleTab) extends 
WebUIPage("") with Logging {
         AggregatedTaskInfoUIData(0, 0, 0, 0)
       else
         aggTaskInfo
-    val percent =
+    val percent = {
       if (taskInfo.cpuTimeMillis == 0)
         0
-      else
+      else {
         (taskInfo.shuffleWriteMillis + taskInfo.shuffleReadMillis).toDouble / 
taskInfo.cpuTimeMillis
+      }
+    }
+    // speed unit is MB/sec
+    val clientObservedWriteAvgSpeed = if (aggTaskInfo.shuffleWriteMillis == 0) 
0 else {
+      roundToTwoDecimals(aggTaskInfo.shuffleBytes.toDouble / 
aggTaskInfo.shuffleWriteMillis / 1000)
+    }
+    val clientObservedReadAvgSpeed = if (aggTaskInfo.shuffleReadMillis == 0) 0 
else {
+      roundToTwoDecimals(aggTaskInfo.shuffleBytes.toDouble / 
aggTaskInfo.shuffleReadMillis / 1000)

Review Comment:
   Yes. This is aligned with the spark's shuffle write metrics



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

Reply via email to