Package com.thingworx.metrics.builder
Interface IStatisticBuilder<V,Q>
- Type Parameters:
V
- the type of value that is fed into the metricQ
- the type returned for quantiles
Builds a statistic metric based on the type selected.
-
Method Summary
Modifier and TypeMethodDescriptionIStatistic
<V, Q>
Returns a statistical metric that uses an exponential decay algorithm to weigh metrics more heavily towards newer data points.IStatistic
<V, Q>
Returns a metric that only tracks the last N measurements provided, where N ≤ 500.IStatistic
<V, Q>
Returns a uniformly-distributed metric.
-
Method Details
-
uniform
Returns a uniformly-distributed metric. Uniform distribution is appropriate for metrics that are relevant over the lifespan of the Platform, where all data points should be accounted for.- Parameters:
key
- the metric key- Returns:
- a uniformly-distributed metric
-
expDecay
Returns a statistical metric that uses an exponential decay algorithm to weigh metrics more heavily towards newer data points. This is recommended when you only want statistics that are relevant for approximately the last five minutes of Platform execution.- Parameters:
key
- the metric key- Returns:
- an exponentially-decaying metric
-
lastN
Returns a metric that only tracks the last N measurements provided, where N ≤ 500. Once (N + 1) measurements are fed, the first measurement will be dropped and no longer factored into the statistics.- Parameters:
key
- the metric keyn
- the number of values to track- Returns:
- a windowed metric
-