Package org.opencms.util.benchmark
Class CmsBenchmarkTable
- java.lang.Object
-
- org.opencms.util.benchmark.CmsBenchmarkTable
-
public class CmsBenchmarkTable extends java.lang.Object
Manages a set of benchmark timers.Each benchmark timer is started with start(name) and stopped with stop(name). When stop() is called, the time between the start and stop calls for that name, in milliseconds, are sent to the configured benchmark receiver instance.
-
-
Constructor Summary
Constructors Constructor Description CmsBenchmarkTable(org.opencms.util.benchmark.CmsBenchmarkTable.Receiver receiver)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
start(java.lang.String name)
Starts the timer with the given name.void
stop(java.lang.String name)
Stops the timer with the given name, and sends the value of the timer to the benchmark receiver.
-
-
-
Constructor Detail
-
CmsBenchmarkTable
public CmsBenchmarkTable(org.opencms.util.benchmark.CmsBenchmarkTable.Receiver receiver)
Creates a new instance.- Parameters:
receiver
- the benchmark receiver to use
-
-
Method Detail
-
start
public void start(java.lang.String name)
Starts the timer with the given name.The name is just an arbitrary string.
- Parameters:
name
- the name of the timer
-
stop
public void stop(java.lang.String name)
Stops the timer with the given name, and sends the value of the timer to the benchmark receiver.- Parameters:
name
- the name of the timer
-
-