All Packages Class Hierarchy This Package Previous Next Index
Class COM.objectspace.jgl.util.Benchmark
java.lang.Object
|
+----COM.objectspace.jgl.util.Benchmark
- public class Benchmark
- extends Object
- implements Serializable
A utility class for performing benchmarks.
-
Benchmark()
- Construct a benchmark with the title that never displays its status
automatically.
-
Benchmark(String)
- Construct a benchmark with the specified title that never displays its status
automatically.
-
Benchmark(String, int)
- Construct a benchmark with the specified title that displays its status
automatically after every specified number of start/stop cycles.
-
compareTo(Benchmark)
- Display a string that compares me with another benchmark to
System.out.
-
getCount()
- Return the number of times I've been started/restarted.
-
getMilliseconds()
- Return the current number of milliseconds on the benchmark clock.
-
getTitle()
- Return my title.
-
start()
- Start/resume the benchmark clock.
-
stop()
- Stop the benchmark clock.
-
toString()
- Return a string that describes me.
Benchmark
public Benchmark(String string,
int n)
- Construct a benchmark with the specified title that displays its status
automatically after every specified number of start/stop cycles.
- Parameters:
- string - The title
- n - The number of cycles
Benchmark
public Benchmark(String string)
- Construct a benchmark with the specified title that never displays its status
automatically.
Benchmark
public Benchmark()
- Construct a benchmark with the title that never displays its status
automatically.
start
public void start()
- Start/resume the benchmark clock.
stop
public void stop()
- Stop the benchmark clock.
getMilliseconds
public long getMilliseconds()
- Return the current number of milliseconds on the benchmark clock.
getTitle
public String getTitle()
- Return my title.
getCount
public int getCount()
- Return the number of times I've been started/restarted.
toString
public String toString()
- Return a string that describes me.
- Overrides:
- toString in class Object
compareTo
public void compareTo(Benchmark benchmark)
- Display a string that compares me with another benchmark to
System.out.
- Parameters:
- benchmark - The benchmark to compare myself against.
All Packages Class Hierarchy This Package Previous Next Index