You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/05/17 00:50:32 UTC
[iotdb] branch master updated: [IOTDB-5862] optimize thrift metrics precision
This is an automated email from the ASF dual-hosted git repository.
jackietien 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 a70d3c827e [IOTDB-5862] optimize thrift metrics precision
a70d3c827e is described below
commit a70d3c827e50ac2cd1a04ce9c051ca47e99baf33
Author: ZhangHongYin <46...@users.noreply.github.com>
AuthorDate: Wed May 17 08:50:26 2023 +0800
[IOTDB-5862] optimize thrift metrics precision
---
.../org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java
index ae55b976fa..7937d6d3fd 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java
@@ -48,7 +48,7 @@ public class ProcessorWithMetrics extends Processor {
@Override
public void process(TProtocol in, TProtocol out) throws TException {
TMessage msg = in.readMessageBegin();
- long startTime = System.currentTimeMillis();
+ long startTime = System.nanoTime();
ProcessFunction fn = (ProcessFunction) getProcessMapView().get(msg.name);
if (fn == null) {
TProtocolUtil.skip(in, TType.STRUCT);
@@ -63,11 +63,11 @@ public class ProcessorWithMetrics extends Processor {
} else {
fn.process(msg.seqid, in, out, iface);
}
- long cost = System.currentTimeMillis() - startTime;
+ long cost = System.nanoTime() - startTime;
MetricService.getInstance()
.timer(
cost,
- TimeUnit.MILLISECONDS,
+ TimeUnit.NANOSECONDS,
Metric.ENTRY.toString(),
MetricLevel.CORE,
Tag.NAME.toString(),