org.slf4j.helpers
Class BogoPerf

java.lang.Object
  extended by org.slf4j.helpers.BogoPerf

public class BogoPerf
extends Object

BogoPerf is used to check that the time required to perform a certain operation does not deteriorate over time. BogoPerf adjusts to the CPU speed and capabilities of the host.

Author:
Ceki Gülcü

Constructor Summary
BogoPerf()
           
 
Method Summary
static void assertDuration(double currentDuration, long referenceDuration, double referenceBIPS)
          Assertion used for values that decrease with faster CPUs, typically the time (duration) needed to perform a task.
static void assertPerformance(double currentPerformance, long referencePerformance, double referenceBIPS)
          Assertion used for values that increase with faster CPUs, typically the number of operations accomplished per unit of time.
static double currentBIPS()
          Computed the BogoIPS for this host CPU.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BogoPerf

public BogoPerf()
Method Detail

currentBIPS

public static double currentBIPS()
Computed the BogoIPS for this host CPU.

Returns:

assertDuration

public static void assertDuration(double currentDuration,
                                  long referenceDuration,
                                  double referenceBIPS)
                           throws junit.framework.AssertionFailedError
Assertion used for values that decrease with faster CPUs, typically the time (duration) needed to perform a task.

Parameters:
currentDuration -
referenceDuration -
referenceBIPS -
Throws:
junit.framework.AssertionFailedError

assertPerformance

public static void assertPerformance(double currentPerformance,
                                     long referencePerformance,
                                     double referenceBIPS)
                              throws junit.framework.AssertionFailedError
Assertion used for values that increase with faster CPUs, typically the number of operations accomplished per unit of time.

Parameters:
currentPerformance -
referencePerformance -
referenceBIPS -
Throws:
junit.framework.AssertionFailedError


Copyright © 2005-2012 QOS.ch. All Rights Reserved.