hangc0276 commented on code in PR #3677:
URL: https://github.com/apache/bookkeeper/pull/3677#discussion_r1035573413
##########
stats/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java:
##########
@@ -211,12 +214,25 @@ private void registerMetrics(Collector collector) {
}
}
-
private static final Logger log =
LoggerFactory.getLogger(PrometheusMetricsProvider.class);
+ /*
+ * Try to get Netty counter of used direct memory. This will be correct,
unlike the JVM values.
+ */
+ private static final AtomicLong directMemoryUsage;
private static final Optional<BufferPoolMXBean> poolMxBeanOp;
static {
+ AtomicLong tmpDirectMemoryUsage = null;
Review Comment:
Do we need to get direct memory usage here according to
`PlatformDependent.useDirectBufferNoCleaner()` here instead of getting both
values?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]