@ThingworxExtensionApiClass(since={8,1,1}) public interface IStatistic<V,Q> extends IMetric
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.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_N |
static java.lang.String |
N |
static java.lang.String |
QUANTILE_TYPE |
static java.lang.String |
STATISTIC_TYPE |
METRIC_TYPE, VALUE, VALUE_TYPE
Modifier and Type | Method and 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 |
static final java.lang.String QUANTILE_TYPE
static final java.lang.String STATISTIC_TYPE
static final java.lang.String N
static final int DEFAULT_N
@ThingworxExtensionApiMethod(since={8,1,1}) void update(V value)
value
- the value to add@ThingworxExtensionApiMethod(since={8,3}) void update(V value, boolean persist)
value
- the value to addpersist
- whether or not to persist the statistical data@ThingworxExtensionApiMethod(since={8,3}) IStatisticSnapshot<V,Q> snapshot()