Interface StateTimeMetric

All Known Implementing Classes:
DeploymentStateTimeMetrics

public interface StateTimeMetric
Utility to define metrics that capture the time that some component spends in a state.
  • Method Details

    • getCurrentTime

      long getCurrentTime()
      Returns the time, in milliseconds, that have elapsed since we transitioned to the targeted state. Returns 0 if we are not in the targeted state.
    • getTotalTime

      long getTotalTime()
      Returns the total time, in milliseconds, that we have spent in the targeted state.
    • getBinary

      long getBinary()
      Returns 1 if we are in the targeted state, otherwise 0.
    • register

      static void register(org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings, org.apache.flink.metrics.MetricGroup metricGroup, StateTimeMetric stateTimeMetric, String baseName)
    • getStateMetricName

      @VisibleForTesting static String getStateMetricName(String baseName)
    • getCurrentTimeMetricName

      @VisibleForTesting static String getCurrentTimeMetricName(String baseName)
    • getTotalTimeMetricName

      @VisibleForTesting static String getTotalTimeMetricName(String baseName)