srowen commented on a change in pull request #26610: [SPARK-29973][SS] Make 
`processedRowsPerSecond` calculated more accurately and meaningfully
URL: https://github.com/apache/spark/pull/26610#discussion_r348907023
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ProgressReporter.scala
 ##########
 @@ -148,8 +148,8 @@ trait ProgressReporter extends Logging {
     currentTriggerEndTimestamp = triggerClock.getTimeMillis()
 
     val executionStats = extractExecutionStats(hasNewData)
-    val processingTimeSec =
-      (currentTriggerEndTimestamp - currentTriggerStartTimestamp).toDouble / 
MILLIS_PER_SECOND
+    val processingTimeSec = Math.max(1L,
 
 Review comment:
   That looks tidy, yeah.
   (Math is the Java class and math is the Scala wrapper, but it doesn't matter)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to