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
Modifier and TypeMethodDescriptionlongReturns 1 if we are in the targeted state, otherwise 0.longReturns the time, in milliseconds, that have elapsed since we transitioned to the targeted state.static StringgetCurrentTimeMetricName(String baseName) static StringgetStateMetricName(String baseName) longReturns the total time, in milliseconds, that we have spent in the targeted state.static StringgetTotalTimeMetricName(String baseName) static voidregister(org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings, org.apache.flink.metrics.MetricGroup metricGroup, StateTimeMetric stateTimeMetric, String baseName)
-
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
-
getCurrentTimeMetricName
-
getTotalTimeMetricName
-