OneSizeFitsQuorum commented on code in PR #9223:
URL: https://github.com/apache/iotdb/pull/9223#discussion_r1127272907
##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/AsyncPlanNodeSender.java:
##########
@@ -79,6 +82,8 @@ public void sendAll() {
public void waitUntilCompleted() throws InterruptedException {
countDownLatch.await();
+ PerformanceOverviewMetricsManager.getInstance()
Review Comment:
If you record it this way, RemoteCost is always longer than the localCost
##########
consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java:
##########
@@ -221,7 +221,17 @@ public TSStatus write(IConsensusRequest request) {
indexedConsensusRequest.getSearchIndex());
}
IConsensusRequest planNode =
stateMachine.deserializeRequest(indexedConsensusRequest);
+ long startWriteTime = System.nanoTime();
TSStatus result = stateMachine.write(planNode);
+ MetricService.getInstance()
+ .timer(
+ System.nanoTime() - startWriteTime,
+ TimeUnit.NANOSECONDS,
+ Metric.PERFORMANCE_OVERVIEW_SCHEDULE_DETAIL.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ "stateMachine");
Review Comment:
`PerformanceOverviewMetrics.STATEMACHINE`?
##########
consensus/src/main/java/org/apache/iotdb/consensus/ratis/ApplicationStateMachineProxy.java:
##########
@@ -132,7 +136,17 @@ public CompletableFuture<Message>
applyTransaction(TransactionContext trx) {
}
IConsensusRequest deserializedRequest =
applicationStateMachine.deserializeRequest(applicationRequest);
+
+ long startWriteTime = System.nanoTime();
TSStatus result = applicationStateMachine.write(deserializedRequest);
+ MetricService.getInstance()
Review Comment:
we need to distinguish between local and remote apply to make sense of
recording only the former
--
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]