[ 
https://issues.apache.org/jira/browse/SCB-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694107#comment-16694107
 ] 

ASF GitHub Bot commented on SCB-1021:
-------------------------------------

wujimin commented on a change in pull request #997: [SCB-1021] Add vertx client 
server meters
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/997#discussion_r235232498
 
 

 ##########
 File path: 
foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/publish/spectator/MeasurementNode.java
 ##########
 @@ -91,4 +91,12 @@ public double summary() {
 
     return result;
   }
+
+  // GaugePoller sync measurements to meters
+  // but when the first time or measurement expired, maybe get half 
measurements
+  // so need to support node not exist
+  public double findChildAndSummary(String childName) {
+    MeasurementNode node = findChild(childName);
+    return node != null ? node.summary() : 0;
 
 Review comment:
   too expensive
   first time and expired is rare event, just make it not cause problem is 
enough

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> add vertx client/server meters to metrics
> -----------------------------------------
>
>                 Key: SCB-1021
>                 URL: https://issues.apache.org/jira/browse/SCB-1021
>             Project: Apache ServiceComb
>          Issue Type: Sub-task
>          Components: Java-Chassis
>            Reporter: wujimin
>            Assignee: wujimin
>            Priority: Major
>             Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to