All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.andthehorseyourodeinon.utils.RunMetrics

java.lang.Object
   |
   +----com.andthehorseyourodeinon.utils.RunMetrics

public class RunMetrics
extends Object
RunMetrics is a class for tracking time. It's mostly useful for providing and reporting run-time metrics of a process (or section of code) that is run multiple times. It then can report on the average, minimum, and maximum runtimes, along with total time used.

Version:
$Id: RunMetrics.java,v 1.1 2000/05/16 22:45:10 samuelg Exp $

Constructor Index

 o RunMetrics()
 o RunMetrics(String)

Method Index

 o end()
stop the timing cycle
 o getAvgTime()
 o getLongestTime()
 o getName()
get the name of this metric
 o getShortestTime()
 o getTotalSamples()
 o getTotalTime()
 o reportHTML()
generate an HTML-formetted report on this metric, using a table
 o reportText()
generate a text report on this metric.
 o setName(String)
set the name of this metric
 o start()
start the timing cycle
 o stop()
stop the timing cycle.

Constructors

 o RunMetrics
 public RunMetrics()
 o RunMetrics
 public RunMetrics(String name)

Methods

 o setName
 public void setName(String name)
set the name of this metric

 o getName
 public String getName()
get the name of this metric

 o start
 public void start()
start the timing cycle

 o stop
 public void stop()
stop the timing cycle. Better-named wrapper for the end method.

 o end
 public void end()
stop the timing cycle

 o reportText
 public String reportText()
generate a text report on this metric.

 o reportHTML
 public String reportHTML()
generate an HTML-formetted report on this metric, using a table

 o getAvgTime
 public String getAvgTime()
 o getTotalTime
 public String getTotalTime()
 o getShortestTime
 public String getShortestTime()
 o getLongestTime
 public String getLongestTime()
 o getTotalSamples
 public String getTotalSamples()

All Packages  Class Hierarchy  This Package  Previous  Next  Index