com.vordel.reporting.rtm.api
Class MetricTypeValue
java.lang.Object
com.vordel.reporting.rtm.api.MetricType
com.vordel.reporting.rtm.api.MetricTypeValue
public class MetricTypeValue
- extends MetricType
A metric of type MetricTypeValue is a value metric that can be used for
incremental counters, and other measurements, e.g. volumes, times etc.
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.
A value of zero for a time window indicates that no updates occurred
for the metric in that time slot.
The current value will be reported at each time window if it is non-zero.
A time window is the time period for which the Gateway gathers metrics
before writing the values to the database, and resetting for the next
time window.
By default metrics are reset to zero at the start of a new time window.
MetricTypes may be created to not reset at the
start of a new time window by setting the resetOnNewTimeWindow
flag to be false. This should be set to false for metrics which should
not be set to zero just because a new time window has begun, e.g.
systemCpuAvg. Note that a MetricType value is always
reset when a new value is passed to it on a new time window. A
resetOnNewTimeWindow value of false will maintain the value
from the previous time window if no values are passed to the
MetricType for the current time window.
Examples of MetricTypeValue are :-
-
numMessages is an incremental
counter which counts the number of messages.
It is reset at the start of each time window.
The average, minimum and maximum is not calculated for this metric.
The generated metric is named numMessages.
A metric of this type is set via a call to the
increment() method on
the MetricGroup class.
-
processingTime measures the time taken to process a request in the
Gateway. It is reset at the start of each time window.
The average, minimum and maximum is calculated for this metric, so that the
generated metrics are named processingTimeMin, processingTimeMax,
and processingTimeAvg.
A metric of this type is set via a call to the
setValue() method on
the MetricGroup class.
-
systemCpu measures the CPU used on the host running the Gateway.
It is not reset at the start of each time window.
The average, minimum and maximum is calculated for this metric, so that the
generated metrics are named systemCpuMin, systemCpuMax,
and systemCpuAvg.
A metric of this type is set via a call to the
setValue() method on
the MetricGroup class.
-
systemMemoryTotal measures the amount of memory used on the
host machine running the Gateway.
It is not reset at the start of each time window.
The average, minimum and maximum is not calculated for this as it is
a constant value. The generated metric is named systemMemoryTotal.
A metric of this type is set via a call to the
setValue() method on
the MetricGroup class.
|
Constructor Summary |
MetricTypeValue(java.lang.String name)
Construct a MetricTypeValue. |
MetricTypeValue(java.lang.String name,
java.lang.String minName,
java.lang.String maxName,
java.lang.String avgName,
boolean trackCurrentValue,
boolean resetOnNewTimeWindow)
Construct a MetricTypeValue. |
| Methods inherited from class com.vordel.reporting.rtm.api.MetricType |
getAvgName, getMaxName, getMetricNames, 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 |
MetricTypeValue
public MetricTypeValue(java.lang.String name)
- Construct a
MetricTypeValue.
trackCurrentValue defaults to true.
- Parameters:
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 if the displayName is null.
MetricTypeValue
public MetricTypeValue(java.lang.String name,
java.lang.String minName,
java.lang.String maxName,
java.lang.String avgName,
boolean trackCurrentValue,
boolean resetOnNewTimeWindow)
- Construct a
MetricTypeValue.
- Parameters:
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.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.
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel