org.rubato.rubettes.util
Class PerformanceCheck

java.lang.Object
  extended by org.rubato.rubettes.util.PerformanceCheck

public class PerformanceCheck
extends java.lang.Object

A utility class for benchmark tests. Example: PerformanceCheck.reset(); for (int i = 0; i < 10; i++) { PerformanceCheck.startTask("task1"); ... do something ... PerformanceCheck.startTask("task2"); ... do something else ... } PerformanceCheck.print();

Author:
Florian Thalmann

Constructor Summary
PerformanceCheck()
           
 
Method Summary
static void print()
          Prints the timer states for all known tasks.
static void printPercentages()
          Prints the percentage of each timer states for all known tasks.
static void reset()
          Resets all timers.
static void startTask(java.lang.String currentTaskName)
          Starts the timer for the specified task and stops the timer for the previous task.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceCheck

public PerformanceCheck()
Method Detail

reset

public static void reset()
Resets all timers.


startTask

public static void startTask(java.lang.String currentTaskName)
Starts the timer for the specified task and stops the timer for the previous task. If the timer for the specified task does not exist yet, it is generated.

Parameters:
currentTaskName - - the name of the started task

print

public static void print()
Prints the timer states for all known tasks.


printPercentages

public static void printPercentages()
Prints the percentage of each timer states for all known tasks.