Package com.thingworx.metrics
Interface IStatistic<V,Q>
-
- All Superinterfaces:
IMetric
@ThingworxExtensionApiClass(since={8,1,1}) public interface IStatistic<V,Q> extends IMetric
A metric that tracks statistical information for numeric values.Statistic metrics are tracked via a histogram. Values fed into the histogram are sorted into quantiles and tracked by counts; as a result, the raw values are not stored and cannot be retrieved. Typical statistical information is available, including min/mean/max values, as well as a standard set of percentiles.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_N
static java.lang.String
N
static java.lang.String
QUANTILE_TYPE
static java.lang.String
STATISTIC_TYPE
-
Fields inherited from interface com.thingworx.metrics.IMetric
METRIC_TYPE, VALUE, VALUE_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IStatisticSnapshot<V,Q>
snapshot()
void
update(V value)
Updates the statistical data with the provided value.void
update(V value, boolean persist)
Updates the statistical data with the provided value with optional persistence
-
-
-
Field Detail
-
QUANTILE_TYPE
static final java.lang.String QUANTILE_TYPE
- See Also:
- Constant Field Values
-
STATISTIC_TYPE
static final java.lang.String STATISTIC_TYPE
- See Also:
- Constant Field Values
-
N
static final java.lang.String N
- See Also:
- Constant Field Values
-
DEFAULT_N
static final int DEFAULT_N
- See Also:
- Constant Field Values
-
-
Method Detail
-
update
@ThingworxExtensionApiMethod(since={8,1,1}) void update(V value)
Updates the statistical data with the provided value.- Parameters:
value
- the value to add
-
update
@ThingworxExtensionApiMethod(since={8,3}) void update(V value, boolean persist)
Updates the statistical data with the provided value with optional persistence- Parameters:
value
- the value to addpersist
- whether or not to persist the statistical data
-
snapshot
@ThingworxExtensionApiMethod(since={8,3}) IStatisticSnapshot<V,Q> snapshot()
-
-