BewareMyPower commented on code in PR #26163:
URL: https://github.com/apache/pulsar/pull/26163#discussion_r3567768133


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicLoadingContext.java:
##########
@@ -21,19 +21,15 @@
 import java.util.Map;
 import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.TimeUnit;
 import lombok.Getter;
-import lombok.RequiredArgsConstructor;
 import lombok.Setter;
 import org.apache.pulsar.common.naming.TopicName;
+import org.apache.pulsar.common.util.LatencyTracer;
 import org.jspecify.annotations.Nullable;
 
-@RequiredArgsConstructor
-public class TopicLoadingContext {
+public class TopicLoadingContext extends LatencyTracer {
 
-    private static final String EXAMPLE_LATENCY_OUTPUTS = "1234 ms (queued: 
567)";
-
-    private final long startNs = System.nanoTime();
+    private final LatencyTracer latencyTracer = new LatencyTracer(5);

Review Comment:
   yes, because it originally used composition instead of inheritance, later I 
found inheritance should be better in this case



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