You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/11/30 07:05:05 UTC

[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #3677: Make `jvm_memory_direct_bytes_used` metrics compatible with jdk8.

horizonzy commented on code in PR #3677:
URL: https://github.com/apache/bookkeeper/pull/3677#discussion_r1035594456


##########
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:
   done



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org