Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2937#discussion_r19454486
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1237,12 +1237,27 @@ private[spark] object Utils extends Logging {
       /**
        * Timing method based on iterations that permit JVM JIT optimization.
        * @param numIters number of iterations
    -   * @param f function to be executed
    +   * @param f function to be executed. If prepare is not None, the running 
time of each call to f
    +   *          must be an order of magnitude longer than one millisecond 
for accurate timing.
    +   * @param prepare function to be executed before each call to f. Its 
running time doesn't count.
        */
    -  def timeIt(numIters: Int)(f: => Unit): Long = {
    -    val start = System.currentTimeMillis
    -    times(numIters)(f)
    -    System.currentTimeMillis - start
    +  def timeIt(numIters: Int)(f: => Unit, prepare: Option[() => Unit] = 
None): Long = {
    --- End diff --
    
    done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to