You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2023/04/12 06:24:59 UTC

[eventmesh] branch master updated: #2975 removed String.format() Modified two constants in MonitorMetricConstants (EVENTMESH_MONITOR_FORMAT_COMMON, EVENTMESH_TCP_MONITOR_FORMAT_THREADPOOL) to work without using String.format()

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new bad0bbd54 #2975 removed String.format() Modified two constants in MonitorMetricConstants (EVENTMESH_MONITOR_FORMAT_COMMON, EVENTMESH_TCP_MONITOR_FORMAT_THREADPOOL) to work without using String.format()
     new 21e3ad9da Merge pull request #3698 from dipankr/fix_patch_2975
bad0bbd54 is described below

commit bad0bbd54cbfab326ddc23c45adea5c867e0f831
Author: dipanker <di...@gmail.com>
AuthorDate: Wed Apr 12 02:05:57 2023 +0530

    #2975 removed String.format()
    Modified two constants in MonitorMetricConstants (EVENTMESH_MONITOR_FORMAT_COMMON, EVENTMESH_TCP_MONITOR_FORMAT_THREADPOOL) to work without using String.format()
---
 .../org/apache/eventmesh/runtime/metrics/MonitorMetricConstants.java  | 4 ++--
 .../org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/MonitorMetricConstants.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/MonitorMetricConstants.java
index c702f0aed..f440e1041 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/MonitorMetricConstants.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/MonitorMetricConstants.java
@@ -19,9 +19,9 @@ package org.apache.eventmesh.runtime.metrics;
 
 public class MonitorMetricConstants {
 
-    public static final String EVENTMESH_MONITOR_FORMAT_COMMON = "{\"protocol\":\"%s\",\"s\":\"%s\",\"t\":\"%s\"}";
+    public static final String EVENTMESH_MONITOR_FORMAT_COMMON = "{\"protocol\":\"{}\",\"s\":\"{}\",\"t\":\"{}\"}";
 
-    public static final String EVENTMESH_TCP_MONITOR_FORMAT_THREADPOOL = "{\"threadPoolName\":\"%s\",\"s\":\"%s\",\"t\":\"%s\"}";
+    public static final String EVENTMESH_TCP_MONITOR_FORMAT_THREADPOOL = "{\"threadPoolName\":\"{}\",\"s\":\"{}\",\"t\":\"{}\"}";
 
     public static final String CLIENT_2_EVENTMESH_TPS = "client2eventMeshTPS";
     public static final String EVENTMESH_2_MQ_TPS = "eventMesh2mqTPS";
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java
index 2ad98ceec..8800337a0 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java
@@ -133,11 +133,11 @@ public class EventMeshTcpMonitor {
 
             //monitor retry queue size
             tcpSummaryMetrics.setRetrySize(eventMeshTCPServer.getEventMeshTcpRetryer().getRetrySize());
-            appLogger.info(String.format(
+            appLogger.info(
                 MonitorMetricConstants.EVENTMESH_MONITOR_FORMAT_COMMON,
                 EventMeshConstants.PROTOCOL_TCP,
                 MonitorMetricConstants.RETRY_QUEUE_SIZE,
-                tcpSummaryMetrics.getRetrySize()));
+                tcpSummaryMetrics.getRetrySize());
 
         }, 10, PRINT_THREADPOOLSTATE_INTERVAL, TimeUnit.SECONDS);
         log.info("EventMeshTcpMonitor started......");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org