ankitsinghal commented on a change in pull request #19: 
RATIS-549,RATIS-550,RATIS-552,RATIS-553 Metric Framework for Ratis
URL: https://github.com/apache/incubator-ratis/pull/19#discussion_r284036614
 
 

 ##########
 File path: 
ratis-logservice/src/main/java/org/apache/ratis/logservice/server/MetaStateMachine.java
 ##########
 @@ -172,27 +176,30 @@ public TransactionContext 
preAppendTransaction(TransactionContext trx) throws IO
 
     @Override
     public CompletableFuture<Message> query(Message request) {
-        if (currentGroup == null) {
-            try {
-                List<RaftGroup> x = 
StreamSupport.stream(raftServer.getGroups().spliterator(), false)
-                    .filter(group -> 
group.getGroupId().equals(metadataGroupId))
-                    .collect(Collectors.toList());
-                if (x.size() == 1) {
-                    currentGroup = x.get(0);
+        long start = System.currentTimeMillis();
 
 Review comment:
   Yeah , Looks like someone did some benchmarking and found system.nanoTime() 
is slower
   
https://stackoverflow.com/questions/19052316/why-is-system-nanotime-way-slower-in-performance-than-system-currenttimemill/19052440

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to