Module io.ebean.api

Interface TimedMetric


public interface TimedMetric
Metric for timed events like transaction execution times.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(long micros)
    Add a time event (usually in microseconds).
    void
    addBatchSince(long startNanos, int batch)
    Add a time event for a batch of beans.
    void
    addSinceNanos(long startNanos)
    Add a time event given the start nanos.
    collect(boolean reset)
    Collect and return a snapshot of the metrics.
    boolean
    Return true if there are no metrics collected since the last collection.
    void
    Reset the statistics.
    void
    Visit non empty metrics.
  • Method Details

    • add

      void add(long micros)
      Add a time event (usually in microseconds).
    • addBatchSince

      void addBatchSince(long startNanos, int batch)
      Add a time event for a batch of beans.
    • addSinceNanos

      void addSinceNanos(long startNanos)
      Add a time event given the start nanos.
    • isEmpty

      boolean isEmpty()
      Return true if there are no metrics collected since the last collection.
    • reset

      void reset()
      Reset the statistics.
    • collect

      TimedMetricStats collect(boolean reset)
      Collect and return a snapshot of the metrics.
    • visit

      void visit(MetricVisitor visitor)
      Visit non empty metrics.