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

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

heyile commented on a change in pull request #1012: [SCB-1044]add current 
process CPU rate  and net packets in the metrics
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1012#discussion_r238672021
 
 

 ##########
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/CpuMeter.java
 ##########
 @@ -16,92 +16,59 @@
  */
 package org.apache.servicecomb.metrics.core.meter.os;
 
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.util.List;
 
-import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.servicecomb.metrics.core.meter.os.cpu.OsCpuUsage;
+import org.apache.servicecomb.metrics.core.meter.os.cpu.ProcessCpuUsage;
 
+import com.google.common.annotations.VisibleForTesting;
+import com.netflix.spectator.api.BasicTag;
 import com.netflix.spectator.api.Id;
 import com.netflix.spectator.api.Measurement;
+import com.netflix.spectator.api.Tag;
 
 public class CpuMeter {
-  private static final Logger LOGGER = LoggerFactory.getLogger(CpuMeter.class);
 
-  private double rate;
+  public static final Tag TAG_All = new BasicTag(OsMeter.OS_TYPE, 
OsMeter.OS_TYPE_ALL_CPU);
 
-  private long lastTotalTime;
+  public static final Tag TAG_CURRENT = new BasicTag(OsMeter.OS_TYPE, 
OsMeter.OS_TYPE_PROCESS_CPU);
 
 Review comment:
   ok. I will modify it

----------------------------------------------------------------
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 current process CPU rate  and net packets in the metrics
> ------------------------------------------------------------
>
>                 Key: SCB-1044
>                 URL: https://issues.apache.org/jira/browse/SCB-1044
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>            Reporter: 何一乐
>            Assignee: 何一乐
>            Priority: Major
>




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

Reply via email to