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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getBinary()
Returns 1 if we are in the targeted state, otherwise 0.long
getCurrentTime()
Returns the time, in milliseconds, that have elapsed since we transitioned to the targeted state.static String
getCurrentTimeMetricName(String baseName)
static String
getStateMetricName(String baseName)
long
getTotalTime()
Returns the total time, in milliseconds, that we have spent in the targeted state.static String
getTotalTimeMetricName(String baseName)
static void
register(org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings, org.apache.flink.metrics.MetricGroup metricGroup, StateTimeMetric stateTimeMetric, String baseName)
-
-
-
Method Detail
-
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)
-
getCurrentTimeMetricName
@VisibleForTesting static String getCurrentTimeMetricName(String baseName)
-
-