cckellogg commented on a change in pull request #10819:
URL: https://github.com/apache/pulsar/pull/10819#discussion_r645648185



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -801,12 +803,16 @@ public Boolean get() {
                 this.resourceUsageTransportManager = 
(ResourceUsageTransportManager) object;
             }
 
+            long now = System.currentTimeMills();
+            double elapsedSeconds = (now - serviceStartTime) / 1000d;

Review comment:
       We could use the TimeUnit class to make the conversion for us.
   ```
   final long bootstrapTimeSeconds =
                       
TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - startTimestamp);
   ```

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -801,12 +803,16 @@ public Boolean get() {
                 this.resourceUsageTransportManager = 
(ResourceUsageTransportManager) object;
             }
 
+            long now = System.currentTimeMills();
+            double elapsedSeconds = (now - serviceStartTime) / 1000d;
+            
             final String bootstrapMessage = "bootstrap service "
                     + (config.getWebServicePort().isPresent() ? "port = " + 
config.getWebServicePort().get() : "")
                     + (config.getWebServicePortTls().isPresent() ? ", tls-port 
= " + config.getWebServicePortTls() : "")
                     + (config.getBrokerServicePort().isPresent() ? ", broker 
url= " + brokerServiceUrl : "")
                     + (config.getBrokerServicePortTls().isPresent() ? ", 
broker tls url= " + brokerServiceUrlTls : "");
             LOG.info("messaging service is ready");

Review comment:
       Instead of adding new log we could add to the log above.
   ```
   LOG.info("messaging service is ready bootstrap_seconds={}", 
bootstrapTimeSeconds)
   ```




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

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


Reply via email to