Class StatementMetricRepository

java.lang.Object
com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricRepository

public class StatementMetricRepository extends Object
A repository for all statement metrics that organizes statements into statement groups.

At a minimum there is one group (the default) of index zero.

  • Constructor Details

    • StatementMetricRepository

      public StatementMetricRepository(String runtimeURI, ConfigurationRuntimeMetricsReporting specification)
      Ctor.
      Parameters:
      runtimeURI - runtime URI
      specification - specifies statement groups
  • Method Details

    • addStatement

      public StatementMetricHandle addStatement(DeploymentIdNamePair statement)
      Add a statement, inspecting the statement name and adding it to a statement group or the default group, if none.
      Parameters:
      statement - name to inspect
      Returns:
      handle for statement
    • removeStatement

      public void removeStatement(DeploymentIdNamePair statement)
      Remove statement.
      Parameters:
      statement - to remove
    • accountTimes

      public void accountTimes(StatementMetricHandle handle, long cpu, long wall, int numInput)
      Account statement times.
      Parameters:
      handle - statement handle
      cpu - time
      wall - time
      numInput - number of input rows
    • accountOutput

      public void accountOutput(StatementMetricHandle handle, int numIStream, int numRStream)
      Account row output.
      Parameters:
      handle - statement handle
      numIStream - num rows insert stream
      numRStream - num rows remove stream
    • reportGroup

      public StatementMetric[] reportGroup(int group)
      Report for a given statement group.
      Parameters:
      group - to report
      Returns:
      metrics or null if none
    • iterateMetrics

      public void iterateMetrics(Consumer<EPMetricsStatementGroup> consumer)