mxsm commented on code in PR #3362:
URL:
https://github.com/apache/incubator-eventmesh/pull/3362#discussion_r1127830621
##########
eventmesh-metrics-plugin/eventmesh-metrics-api/src/main/java/org/apache/eventmesh/metrics/api/model/HttpSummaryMetrics.java:
##########
@@ -120,20 +120,20 @@ public float avgHTTPBodyDecodeCost() {
return (httpDecodeNum.longValue() == 0L) ? 0f : httpDecodeTimeCost /
httpDecodeNum.longValue();
}
- private AtomicLong sendBatchMsgNumPerSecond = new AtomicLong(0);
+ private final AtomicLong sendBatchMsgNumPerSecond = new AtomicLong(0);
- private AtomicLong sendBatchMsgNumSum = new AtomicLong(0);
+ private final AtomicLong sendBatchMsgNumSum = new AtomicLong(0);
- private AtomicLong sendBatchMsgFailNumSum = new AtomicLong(0);
+ private final AtomicLong sendBatchMsgFailNumSum = new AtomicLong(0);
// This is a cumulative value
- private AtomicLong sendBatchMsgDiscardNumSum = new AtomicLong(0);
+ private final AtomicLong sendBatchMsgDiscardNumSum = new AtomicLong(0);
public void recordSendBatchMsgDiscard(long delta) {
sendBatchMsgDiscardNumSum.addAndGet(delta);
}
Review Comment:
Adjust the position of variables, move them to the beginning of the file
class, and place the methods below the variables.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]