-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat JBoss Data Virtualization
12.3. Windows and Statistics
As mentioned above, the hierarchical database measures the values for each metric every 5 seconds. But it would take vast amounts of space to keep all these measurements around for long periods of time. Instead, the hierarchical database calculates the statistics for various intervals, and then rolls up the statistics into different time windows .
The statistics are straightforward:
Statistic
|
Data type
|
Description
|
---|---|---|
Count
|
int
|
The number of samples.
|
Maximum
|
long
|
The maximum value from the samples.
|
Minimum
|
long
|
The minimum value from the samples.
|
Mean
|
double
|
The mean (or average) value from the samples.
|
Variance
|
double
|
The average of the squared differences from the mean .
|
Standard Deviation
|
double
|
A measure of how spread out the samples are and is the square root of the variance
|
and are represented in the API by the
org.modeshape.jcr.api.monitor.Statistics
interface (with getter methods for each statistic). The statistics were chosen because multiple Statistics
objects can easily be rolled-up into a single Statistic
object.
The rollup process is pretty simple. For each metric:
- The value is captured every 5 seconds, and recorded a
Statistics
instance with a single sample. This is repeated 9 more times. - After 60 seconds, the 10
Statistics
objects recorded in the previous step are rolled-up into a singleStatistics
object for this minute. This is repeated 59 more times. - After 60 minutes, the 60
Statistics
objects recorded in the previous step are rolled-up into a singleStatistics
object for this hour. This is repeated 23 more times. - After 24 hours, the 24
Statistics
objects recorded in the previous step are rolled-up into a singleStatistics
object for the day. This is repeated 7 more times. - After 7 days, the 7
Statistics
objects recorded in the previous step are rolled-up into a singleStatistics
object for the week. This is repeated 52 more times.
Each of these periods represents a window in time during with the
Statistics
are captured:
Window timeframe
|
Description
|
---|---|
60 seconds
|
A
Statistics for each of the ten 5-second intervals during the last minute.
|
60 minutes
|
A
Statistics for each minute during the last hour.
|
24 hours
|
A
Statistics for each hour during the last day.
|
7 days
|
A
Statistics for each day during the last week.
|
52 weeks
|
A
Statistics for each week during the last year.
|
The
org.modeshape.jcr.api.monitor.Window
enumeration is used to represent each of these windows in time.