dao-jun commented on code in PR #19716:
URL: https://github.com/apache/pulsar/pull/19716#discussion_r1133763465
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/util/StatsBuckets.java:
##########
@@ -73,6 +73,19 @@ public void refresh() {
this.count = count;
}
+ public void collect() {
+ long count = 0;
+ sum = sumCounter.sum();
+
+ for (int i = 0; i < buckets.length; i++) {
+ long value = buckets[i].sum();
+ count += value;
+ values[i] = value;
+ }
+
+ this.count = count;
Review Comment:
There seems to be a problem. For Histogram, `count` is the times of
add/observe method invoked
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java:
##########
@@ -1117,6 +1117,11 @@ public SubscriptionStatsImpl getStats(Boolean
getPreciseBacklog, boolean subscri
if (dispatcher instanceof PersistentDispatcherMultipleConsumers) {
subStats.delayedMessageIndexSizeInBytes =
((PersistentDispatcherMultipleConsumers)
dispatcher).getDelayedTrackerMemoryUsage();
+
+ subStats.bucketDelayedIndexStats =
+ ((PersistentDispatcherMultipleConsumers)
dispatcher).getBucketDelayedIndexStats();
+
+ System.out.println();
Review Comment:
Should be removed?
--
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]