.. java:import:: java.io Serializable .. java:import:: java.util ArrayList .. java:import:: java.util Collection .. java:import:: java.util Date .. java:import:: java.util HashMap .. java:import:: java.util List .. java:import:: java.util Locale .. java:import:: java.util Map .. java:import:: java.util Map.Entry .. java:import:: org.apache.logging.log4j LogManager .. java:import:: org.apache.logging.log4j Logger .. java:import:: org.caosdb.server CaosDBServer .. java:import:: org.caosdb.server ServerProperties .. java:import:: org.caosdb.server.utils CronJob .. java:import:: org.caosdb.server.utils Info .. java:import:: org.caosdb.server.utils ServerStat .. java:import:: org.jdom2 Element TransactionBenchmark ==================== .. java:package:: org.caosdb.server.database.misc :noindex: .. java:type:: public abstract class TransactionBenchmark implements Serializable The TransactionBenchmark object allows to store the time which some actions take. At its core, it consists of: A list of named Measurements.A list of named SubBenchmarks. Each measurement may be recorded on multiple occasions, the stored Measurement objects keep a statistic about the total and average recorded times. Fields ------ isActive ^^^^^^^^ .. java:field:: protected static final transient boolean isActive :outertype: TransactionBenchmark logger ^^^^^^ .. java:field:: public final transient Logger logger :outertype: TransactionBenchmark measurements ^^^^^^^^^^^^ .. java:field:: protected final Map measurements :outertype: TransactionBenchmark since ^^^^^ .. java:field:: long since :outertype: TransactionBenchmark stackTraceElements ^^^^^^^^^^^^^^^^^^ .. java:field:: protected StackTraceElement[] stackTraceElements :outertype: TransactionBenchmark subBenchmarks ^^^^^^^^^^^^^ .. java:field:: protected final Map subBenchmarks :outertype: TransactionBenchmark Constructors ------------ TransactionBenchmark ^^^^^^^^^^^^^^^^^^^^ .. java:constructor:: protected TransactionBenchmark() :outertype: TransactionBenchmark Methods ------- addMeasurement ^^^^^^^^^^^^^^ .. java:method:: public void addMeasurement(Object object, long time) :outertype: TransactionBenchmark Add a measurement. The object will be toString()'ed. The string serves as a key. :param object: :param time: addMeasurement ^^^^^^^^^^^^^^ .. java:method:: public void addMeasurement(Object object, long time, int count) :outertype: TransactionBenchmark Add a measurement. The object will be toString()'ed. The string serves as a key. :param object: :param time: :param count: addMeasurement ^^^^^^^^^^^^^^ .. java:method:: public void addMeasurement(Measurement measurement) :outertype: TransactionBenchmark Add a measurement. :param measurement: called_from ^^^^^^^^^^^ .. java:method:: public String called_from() :outertype: TransactionBenchmark Return a String (or null) denoting where this TransactionBenchmark was created from. createBenchmark ^^^^^^^^^^^^^^^ .. java:method:: public TransactionBenchmark createBenchmark(String name) :outertype: TransactionBenchmark Create a new independent \ :java:ref:`TransactionBenchmark`\ . Existing benchmarks with the same name are overwritten by this method. This is for starting a series of measurements from a clean slate. However, the Measurements and Benchmarks are still recorded in the \ :java:ref:`RootBenchmark`\ too. :param name: the name of the new \ :java:ref:`TransactionBenchmark`\ . :return: a new \ :java:ref:`TransactionBenchmark`\ createBenchmark ^^^^^^^^^^^^^^^ .. java:method:: public TransactionBenchmark createBenchmark(Class class1) :outertype: TransactionBenchmark Create a sub-benchmark with the name of the given class, overwriting existing ones with the same name. getBenchmark ^^^^^^^^^^^^ .. java:method:: public TransactionBenchmark getBenchmark(String name) :outertype: TransactionBenchmark Return (and create if necessary) the sub-benchmark with the given name. getBenchmark ^^^^^^^^^^^^ .. java:method:: public TransactionBenchmark getBenchmark(Class class1) :outertype: TransactionBenchmark Return (and create if necessary) the sub-benchmark with the name of the given class. getMeasurements ^^^^^^^^^^^^^^^ .. java:method:: public Iterable getMeasurements() :outertype: TransactionBenchmark getName ^^^^^^^ .. java:method:: public abstract String getName() :outertype: TransactionBenchmark getRootInstance ^^^^^^^^^^^^^^^ .. java:method:: public static TransactionBenchmark getRootInstance() :outertype: TransactionBenchmark getSubBenchmarks ^^^^^^^^^^^^^^^^ .. java:method:: public Iterable getSubBenchmarks() :outertype: TransactionBenchmark toElement ^^^^^^^^^ .. java:method:: public Element toElement() :outertype: TransactionBenchmark toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: TransactionBenchmark