accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <...@git.apache.org>
Subject [GitHub] accumulo pull request #271: ACCUMULO-4655 Added a Response Time column to th...
Date Tue, 20 Jun 2017 16:19:44 GMT
Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/271#discussion_r123024306
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
---
    @@ -314,13 +314,22 @@ static void doTserverList(HttpServletRequest req, StringBuilder
sb, List<TabletS
         long now = System.currentTimeMillis();
     
         double avgLastContact = 0.;
    +    double avgResponseTime = 0.;
    +    int count = 0;
         for (TabletServerStatus status : tservers) {
    +      count++;
           avgLastContact += (now - status.lastContact);
    +      avgResponseTime += status.responseTime;
         }
    -    final long MINUTES = 3 * 60 * 1000;
    +    avgResponseTime /= count;
    +    final long SECOND = 1000;
    --- End diff --
    
    Make these static final at the class-level, please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message