public interface StateTimeMetric
Modifier and Type | Method and 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(MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings,
MetricGroup metricGroup,
StateTimeMetric stateTimeMetric,
String baseName) |
long getCurrentTime()
long getTotalTime()
long getBinary()
static void register(MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings, MetricGroup metricGroup, StateTimeMetric stateTimeMetric, String baseName)
@VisibleForTesting static String getStateMetricName(String baseName)
@VisibleForTesting static String getCurrentTimeMetricName(String baseName)
@VisibleForTesting static String getTotalTimeMetricName(String baseName)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.