Interface StateTimeMetric
-
- All Known Implementing Classes:
DeploymentStateTimeMetrics
public interface StateTimeMetricUtility 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 longgetBinary()Returns 1 if we are in the targeted state, otherwise 0.longgetCurrentTime()Returns the time, in milliseconds, that have elapsed since we transitioned to the targeted state.static StringgetCurrentTimeMetricName(String baseName)static StringgetStateMetricName(String baseName)longgetTotalTime()Returns 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 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)
-
-