|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vordel.reporting.rtm.api.MetricType com.vordel.reporting.rtm.api.MetricTypeRangeCount
public class MetricTypeRangeCount
A metric of type MetricTypeRangeCount
maintains a set of counters
for a set of ranges.
An average, minimum and maximum may be calculated for this type of metric.
By default this type of metric will be reset at the start of a new time window.
The values for each range will be reported at each time window if they are non-zero.
A metric of this type is set via a call to the addSample()
method on the MetricGroup class.
Examples of MetricTypeRangeCount
metrics are as follows:
MetricGroup.addSample("respTimeRange", 300)
.
The Gateway will determine which range the sample falls into and increment
a counter associated with that range.
The average, minimum and maximum is calculated for this metric.
The generated metrics are named respTimeMin, respTimeMax, respTimeAvg,
respTimeRange1, or respTimeRange2,.., respTimeRangen.
addSample()
method on
the MetricGroup class, e.g. MetricGroup.addSample("respStatRange", 200)
is invoked when the HTTP status code 200 is received from a target server.
Field Summary |
---|
Fields inherited from class com.vordel.reporting.rtm.api.MetricType |
---|
allowedApiMethods, avgName, maxName, minName, name, resetOnNewTimeWindow, trackCurrentValue |
Constructor Summary | |
---|---|
MetricTypeRangeCount(java.lang.String name)
Construct a MetricTypeRangeCount . |
|
MetricTypeRangeCount(java.lang.String name,
MetricRange[] metricRanges)
Construct a MetricTypeRangeCount . |
|
MetricTypeRangeCount(java.lang.String name,
java.lang.String minName,
java.lang.String maxName,
java.lang.String avgName,
boolean trackCurrentValue,
boolean resetOnNewTimeWindow,
MetricRange[] metricRanges)
Construct a MetricTypeRangeCount . |
Method Summary | |
---|---|
java.lang.String |
getMetricNameForValue(int value)
For a particular sample value get the metric name of the range that it falls into. |
java.util.List<java.lang.String> |
getMetricNames()
Get the metric names that apply to this MetricTypeRangeCount object. |
MetricRange[] |
getRanges()
Get the MetricRange objects associated with this
MetricTypeRangeCount . |
void |
setRanges(MetricRange[] metricRanges)
Sets the MetricRange objects associated with this
MetricTypeRangeCount . |
Methods inherited from class com.vordel.reporting.rtm.api.MetricType |
---|
getAvgName, getMaxName, getMinName, getName, getResetOnNewTimeWindow, getTrackCurrentValue, isAllowedAPIMethod, setAvgName, setMaxName, setMinName, setResetOnNewTimeWindow, setTrackCurrentValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetricTypeRangeCount(java.lang.String name)
MetricTypeRangeCount
.
Field trackCurrentValue
defaults to true.
name
- The name of the MetricType
. This name
is used to identify the metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database.public MetricTypeRangeCount(java.lang.String name, MetricRange[] metricRanges)
MetricTypeRangeCount
.
trackCurrentValue
defaults to true.
name
- The name of the MetricType
. This name
is used to identify the metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database.metricRanges
- The metric ranges.public MetricTypeRangeCount(java.lang.String name, java.lang.String minName, java.lang.String maxName, java.lang.String avgName, boolean trackCurrentValue, boolean resetOnNewTimeWindow, MetricRange[] metricRanges)
MetricTypeRangeCount
.
name
- The name of the metric. This name
is used to identify the metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database if the displayName is null.minName
- The name for the minimum metric. If null, no minimum metric is generated.
This name is used to identify the minimum metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database.maxName
- The name for the maximum metric. If null, no maximum metric is generated.
This name is used to identify the maximum metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database.avgName
- The name for the average metric. If null, no average metric is generated.
This name is used to identify the average metric when it is retrieved
via the Metrics
class, or output to the
metrics feed and database.trackCurrentValue
- If true, the current value is tracked, i.e. is output to the
metrics feed and database, and available via the
Metrics
utility methods.
In some cases the current value is
not really of any use, e.g. cpuUsed as we have cpuUsedAvg,
cpuUsedMin and cpuUsedMax for the time window.resetOnNewTimeWindow
- If true, the metric is reset to zero when a new time window starts.metricRanges
- The metric ranges.Method Detail |
---|
public java.lang.String getMetricNameForValue(int value)
value
- The sample value
public void setRanges(MetricRange[] metricRanges)
MetricRange
objects associated with this
MetricTypeRangeCount
.
The
- rangespublic MetricRange[] getRanges()
MetricRange
objects associated with this
MetricTypeRangeCount
.
public java.util.List<java.lang.String> getMetricNames()
MetricTypeRangeCount
object.
For a MetricTypeRangeCount
object, there is a metric name per
range in addition to the minimum, maximum and average metric names, (if they are set).
getMetricNames
in class MetricType
|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |