heyile commented on a change in pull request #1075: [SCB-359]Servicecomb 
support latency statistic
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1075#discussion_r259171235
 
 

 ##########
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/invocation/AbstractInvocationMeter.java
 ##########
 @@ -43,18 +44,26 @@
   // handler response
   private SimpleTimer handlersResponseTimer;
 
+  // bucket total
+  private StatisticsBucket totalBucket;
+
   private long lastUpdated;
 
   public AbstractInvocationMeter(Registry registry, Id id) {
     this.registry = registry;
     this.id = id;
 
+    totalBucket = creatStageBucket(MeterInvocationConst.TOTAL_BUCKETS);
     totalTimer = creatStageTimer(MeterInvocationConst.STAGE_TOTAL);
     prepareTimer = creatStageTimer(MeterInvocationConst.STAGE_PREPARE);
     handlersRequestTimer = 
creatStageTimer(MeterInvocationConst.STAGE_HANDLERS_REQUEST);
     handlersResponseTimer = 
creatStageTimer(MeterInvocationConst.STAGE_HANDLERS_RESPONSE);
   }
 
+  protected StatisticsBucket creatStageBucket(String bucketsValue) {
+    return new StatisticsBucket(id.withTag(MeterInvocationConst.TAG_STAGE, 
bucketsValue));
 
 Review comment:
   So.  what value should I use here ? 

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to