This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch iotdb-3791-test
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/iotdb-3791-test by this push:
new 81fc9a6876 add more metrics
81fc9a6876 is described below
commit 81fc9a68761ee97d81d4757e89d1589196b75beb
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Mon Jul 18 11:01:49 2022 +0800
add more metrics
---
.../org/apache/iotdb/db/consensus/statemachine/BaseStateMachine.java | 5 +++++
.../java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/BaseStateMachine.java
b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/BaseStateMachine.java
index 32333f26e9..1f0b97b9cd 100644
---
a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/BaseStateMachine.java
+++
b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/BaseStateMachine.java
@@ -19,6 +19,7 @@
package org.apache.iotdb.db.consensus.statemachine;
+import org.apache.iotdb.commons.StepTracker;
import org.apache.iotdb.consensus.IStateMachine;
import org.apache.iotdb.consensus.common.request.ByteBufferConsensusRequest;
import org.apache.iotdb.consensus.common.request.IConsensusRequest;
@@ -51,9 +52,13 @@ public abstract class BaseStateMachine implements
IStateMachine, IStateMachine.E
protected PlanNode getPlanNode(IConsensusRequest request) {
PlanNode node;
if (request instanceof ByteBufferConsensusRequest) {
+ long startTime = System.nanoTime();
node = PlanNodeType.deserialize(request.serializeToByteBuffer());
+ StepTracker.trace("FromPlanNodeDeserialize", 400, startTime,
System.nanoTime());
} else if (request instanceof MultiLeaderConsensusRequest) {
+ long startTime = System.nanoTime();
node = WALEntry.deserializeInsertNode(request.serializeToByteBuffer());
+ StepTracker.trace("FromWALDeserialize", 400, startTime,
System.nanoTime());
} else if (request instanceof PlanNode) {
node = (PlanNode) request;
} else {
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
index 71ab72eab2..517c0d7968 100755
---
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java
@@ -1055,8 +1055,8 @@ public class DataRegion {
@SuppressWarnings("squid:S3776") // Suppress high Cognitive Complexity
warning
public void insertTablet(InsertTabletNode insertTabletNode)
throws TriggerExecutionException, BatchProcessException,
WriteProcessException {
- long insertTabletStartTime = System.nanoTime();
writeLock("insertTablet");
+ long insertTabletStartTime = System.nanoTime();
try {
TSStatus[] results = new TSStatus[insertTabletNode.getRowCount()];
Arrays.fill(results, RpcUtils.SUCCESS_STATUS);