LuciferYang commented on a change in pull request #31471:
URL: https://github.com/apache/spark/pull/31471#discussion_r570096278



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
##########
@@ -217,8 +217,11 @@ object FileFormatWriter extends Logging {
 
       val commitMsgs = ret.map(_.commitMsg)
 
+      val commitJobStartTime = System.nanoTime()
+      logInfo(s"Start to commit write Job ${description.uuid}.")
       committer.commitJob(job, commitMsgs)
-      logInfo(s"Write Job ${description.uuid} committed.")
+      logInfo(s"Write Job ${description.uuid} committed. " +
+        s"Cost time: ${(System.nanoTime() - commitJobStartTime) / 1000 / 1000} 
ms")

Review comment:
       Maybe should assign `System.nanoTime()` to a `val commitJobEndTime` 
first, otherwise the `Cost time` may not be accurate.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to