Class BenchUtils$

java.lang.Object
org.apache.pekko.http.impl.util.BenchUtils$

public class BenchUtils$ extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final BenchUtils$
    Static reference to the singleton instance of this Scala object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    nanoRace(scala.Function0<scala.runtime.BoxedUnit> f1, scala.Function0<scala.runtime.BoxedUnit> f2, int attempts)
    Races f1 against f2 for attempts times (after 10 warmup runs) and returns the minimum factor between f1 time and f2 time.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MODULE$

      public static final BenchUtils$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • BenchUtils$

      public BenchUtils$()
  • Method Details

    • nanoRace

      public double nanoRace(scala.Function0<scala.runtime.BoxedUnit> f1, scala.Function0<scala.runtime.BoxedUnit> f2, int attempts)
      Races f1 against f2 for attempts times (after 10 warmup runs) and returns the minimum factor between f1 time and f2 time.

      Multiple attempts are more resilient against one time disruptions.

      Parameters:
      f1 - (undocumented)
      f2 - (undocumented)
      attempts - (undocumented)
      Returns:
      (undocumented)