org.razvan.jzx
Class PerformanceCounter

java.lang.Object
  extended by org.razvan.jzx.PerformanceCounter

public class PerformanceCounter
extends java.lang.Object

Track various time periods in the emulator and report them.

This class is used to determine possible performance bottlenecks.

Author:
Razvan Surdulescu (c) 2001 - 2006
You may use and distribute this software for free provided you include this copyright notice. You may not sell this software, use my name for publicity reasons or modify the code without permission from me.

Constructor Summary
PerformanceCounter()
           
 
Method Summary
static void end(java.lang.String name)
          End tracking an event of specified time and record the amount of time it took to complete.
static void report()
          Report all the performance events gathered thus far.
static void setEnable(boolean flag)
          Enable or disable the counter functionality.
static void setWarmup(int value)
          Set the warmup count.
static void start(java.lang.String name)
          Start tracking a new event of specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceCounter

public PerformanceCounter()
Method Detail

setEnable

public static void setEnable(boolean flag)
Enable or disable the counter functionality.


setWarmup

public static void setWarmup(int value)
Set the warmup count.


start

public static void start(java.lang.String name)
Start tracking a new event of specified type.

You may not start the same event type twice in a row; you must end(java.lang.String) it first!

Parameters:
name - The type of performance event to start

end

public static void end(java.lang.String name)
End tracking an event of specified time and record the amount of time it took to complete.

You may not end the same event type twice in a row; you must start(java.lang.String) it first!

Parameters:
name - The type of performance event to end

report

public static void report()
Report all the performance events gathered thus far.