You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/01/07 11:34:40 UTC

[GitHub] heyile commented on a change in pull request #1047: [SCB-1096]change the method to calculate process cpu rate same with top

heyile commented on a change in pull request #1047: [SCB-1096]change the method to calculate process cpu rate same with top
URL: https://github.com/apache/servicecomb-java-chassis/pull/1047#discussion_r245626619
 
 

 ##########
 File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/cpu/AbstractCpuUsage.java
 ##########
 @@ -68,36 +62,21 @@ public void setUsage(double usage) {
     this.usage = usage;
   }
 
-  public void setPeriodTotalTime(long periodTotalTime) {
-    this.periodTotalTime = periodTotalTime;
-  }
-
-  protected String[] readAndSplitStat() throws IOException {
-    File file = new File(filePath);
-    String stat = FileUtils.readLines(file, StandardCharsets.UTF_8).get(0);
-    return stat.trim().split("\\s+");
-  }
-
-  public void update() {
-    String[] stats;
+  @SuppressWarnings("deprecation")
 
 Review comment:
   ok

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services