This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 0b8e31456a4 Load: change the metric type of LoadDiskIO metric from
RATE to COUNTER (#12787)
0b8e31456a4 is described below
commit 0b8e31456a4c2e3805bfbcf33032f1f59f0ba553
Author: Itami Sho <[email protected]>
AuthorDate: Fri Jun 21 20:33:34 2024 +0800
Load: change the metric type of LoadDiskIO metric from RATE to COUNTER
(#12787)
---
.../db/queryengine/metric/load/LoadTsFileCostMetricsSet.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/metric/load/LoadTsFileCostMetricsSet.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/metric/load/LoadTsFileCostMetricsSet.java
index b0ce2ca69a4..d9ce0233b55 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/metric/load/LoadTsFileCostMetricsSet.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/metric/load/LoadTsFileCostMetricsSet.java
@@ -25,7 +25,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.metrics.AbstractMetricService;
import org.apache.iotdb.metrics.impl.DoNothingMetricManager;
import org.apache.iotdb.metrics.metricsets.IMetricSet;
-import org.apache.iotdb.metrics.type.Rate;
+import org.apache.iotdb.metrics.type.Counter;
import org.apache.iotdb.metrics.type.Timer;
import org.apache.iotdb.metrics.utils.MetricLevel;
import org.apache.iotdb.metrics.utils.MetricType;
@@ -50,7 +50,7 @@ public class LoadTsFileCostMetricsSet implements IMetricSet {
private Timer secondPhaseTimer = DoNothingMetricManager.DO_NOTHING_TIMER;
private Timer loadLocallyTimer = DoNothingMetricManager.DO_NOTHING_TIMER;
- private Rate diskIORate = DoNothingMetricManager.DO_NOTHING_RATE;
+ private Counter diskIOCounter = DoNothingMetricManager.DO_NOTHING_COUNTER;
public void recordPhaseTimeCost(String stage, long costTimeInNanos) {
switch (stage) {
@@ -72,7 +72,7 @@ public class LoadTsFileCostMetricsSet implements IMetricSet {
}
public void recordDiskIO(long bytes) {
- diskIORate.mark(bytes);
+ diskIOCounter.inc(bytes);
}
@Override
@@ -99,8 +99,8 @@ public class LoadTsFileCostMetricsSet implements IMetricSet {
Tag.NAME.toString(),
LOAD_LOCALLY);
- diskIORate =
- metricService.getOrCreateRate(
+ diskIOCounter =
+ metricService.getOrCreateCounter(
Metric.LOAD_DISK_IO.toString(),
MetricLevel.IMPORTANT,
Tag.NAME.toString(),