wujimin commented on a change in pull request #550: [SCB-327] Update metrics 
publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#discussion_r167417012
 
 

 ##########
 File path: 
metrics/metrics-common/src/main/java/org/apache/servicecomb/metrics/common/MetricsPublisher.java
 ##########
 @@ -17,43 +17,8 @@
 
 package org.apache.servicecomb.metrics.common;
 
-import java.util.List;
+import java.util.Map;
 
 public interface MetricsPublisher {
-  /**  What's the WindowTime ?
-   We all know there are two major type of metric :
-   1.Time-unrelated,you can get the latest value any time immediately:
-   Counter -> increase or decrease
-   Guage -> set a certain one value
-   2.Time-related,only after a centain time pass you can compute the right 
value,"a centain time" called WindowTime
-   Max & Min -> the max value or min value in a centain time
-   Average -> average value, the simplest algorithm is f = sum / count
-   Rate -> like TPS,algorithm is f = sum / second
-  
-   Will be return "servicecomb.metrics.window_time" setting in 
microservice.yaml
-   */
-  List<Long> getAppliedWindowTime();
-
-  //same as getRegistryMetric({first setting windowTime})
-  RegistryMetric metrics();
-
-  /**
-   * windowTime usage example:
-   * if there is two window time set in "servicecomb.metrics.window_time" like 
1000,2000
-   * then windowTime = 1000 will return result of the setting 1000(1 second)
-   * windowTime = 2000 will return result of the setting 2000(2 second)
-   *
-   * there are three monitor of max,min,total
-   * 0----------1----------2----------3----------  <-time line (second)
-   *   100,200    300,400                          <-value record
-   *
-   *                 ? getRegistryMetric(1000) will return max=200 min=100 
total=300
-   *                   getRegistryMetric(2000) will return max=0 min=0 total=0
-   *                             ? getRegistryMetric(1000) will return max=300 
min=400 total=700
-   *                               getRegistryMetric(2000) will return max=400 
min=100 total=1000
-   *
-   * @param windowTime getAppliedWindowTime() item
-   * @return RegistryMetric
-   */
-  RegistryMetric metricsWithWindowTime(long windowTime);
+  Map<String, Double> metrics();
 
 Review comment:
   why we need this interface?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to