dragosvictor commented on code in PR #21854:
URL: https://github.com/apache/pulsar/pull/21854#discussion_r1442236695


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/manager/UnloadManager.java:
##########
@@ -38,10 +41,63 @@ public class UnloadManager implements StateChangeListener {
 
     private final UnloadCounter counter;
     private final Map<String, CompletableFuture<Void>> inFlightUnloadRequest;
+    private final String lookupServiceAddress;
+    private final LatencyMetric unloadLatency;
+    private final LatencyMetric assignLatency;
+    private final LatencyMetric releaseLatency;
 
-    public UnloadManager(UnloadCounter counter) {
+
+    private class LatencyMetric {
+
+        private static final long OP_TIMEOUT_NS = TimeUnit.HOURS.toNanos(1);
+        private static final double QUANTILES[] = {0.0, 0.50, 0.95, 0.99, 
0.999, 0.9999, 1.0};
+        private static final String LABEL_NAMES[] = {"broker"};

Review Comment:
   I'll add `bundleUnloading` for the metric name, sure! Without the broker, we 
wouldn't have the information regarding where this metric came from. I wanted 
to keep them consistent across the two (latencies and ignored commands), so I 
added them.



-- 
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]

Reply via email to