Class CmsBenchmarkTable

java.lang.Object
org.opencms.util.benchmark.CmsBenchmarkTable

public class CmsBenchmarkTable extends 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

    Modifier and Type
    Method
    Description
    void
    start(String name)
    Starts the timer with the given name.
    void
    stop(String name)
    Stops the timer with the given name, and sends the value of the timer to the benchmark receiver.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CmsBenchmarkTable

      public CmsBenchmarkTable(org.opencms.util.benchmark.CmsBenchmarkTable.Receiver receiver)
      Creates a new instance.
      Parameters:
      receiver - the benchmark receiver to use
  • Method Details

    • start

      public void start(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(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