此内容没有您所选择的语言版本。

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:
Expand
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 single Statistics 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 single Statistics 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 single Statistics 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 single Statistics 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:
Expand
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.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部