6.2. 配置数据网格指标
配置 Data Grid,以通过 指标端点 导出量表和直方图。
流程
-
根据需要
在指标配置中打开或关闭量表和直方图。
声明
<!-- Computes and collects statistics for the Cache Manager. --> <cache-container statistics="true"> <!-- Exports collected statistics as gauge and histogram metrics. --> <metrics gauges="true" histograms="true" /> </cache-container>
<!-- Computes and collects statistics for the Cache Manager. -->
<cache-container statistics="true">
<!-- Exports collected statistics as gauge and histogram metrics. -->
<metrics gauges="true" histograms="true" />
</cache-container>
programmatic
6.2.1. Data Grid Metrics 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
网格与 Eclipse MicroProfile Metrics API 兼容,并可生成量表和直方图指标。
-
Data Grid 指标在
供应商范围内提供。与 JVM 相关的指标在 Data Grid服务器的基本范围内提供。 - 量表提供值,如写操作或 JVM 正常运行时间的平均纳秒数。默认启用量表。如果您启用统计信息,Data Grid 会自动生成量表。
- histograms 提供有关操作执行时间的详细信息,如读取、写入和删除时间。默认情况下,Data Grid 不会启用直方图,因为它们需要额外的计算。