This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a commit to branch iotdb-3791
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/iotdb-3791 by this push:
     new 49caa930d9 add more metrics
49caa930d9 is described below

commit 49caa930d9b2f29191975217b61db437a0e45bd3
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Thu Jul 14 17:10:18 2022 +0800

    add more metrics
---
 .../iotdb/consensus/multileader/logdispatcher/LogDispatcher.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
 
b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
index d8e0f3f64e..0685799915 100644
--- 
a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
+++ 
b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
@@ -200,9 +200,15 @@ public class LogDispatcher {
               }
             }
           }
+          StepTracker.trace("getBatch()", 10, getBatchStartTime, 
System.nanoTime());
           // we may block here if the synchronization pipeline is full
-          syncStatus.addNextBatch(batch);
           StepTracker.trace("getBatch()", 10, getBatchStartTime, 
System.nanoTime());
+
+          long addNextBatchStartTime = System.nanoTime();
+          syncStatus.addNextBatch(batch);
+          StepTracker.trace(
+              "syncStatus.addNextBatch()", 10, addNextBatchStartTime, 
System.nanoTime());
+
           // sends batch asynchronously and migrates the retry logic into the 
callback handler
           sendBatchAsync(batch, new DispatchLogHandler(this, batch));
         }

Reply via email to