Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/629#discussion_r219627594
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ServerStats.java ---
    @@ -53,10 +53,11 @@ public ServerStats(Provider provider) {
         synchronized public long getMinLatency() {
             return minLatency == Long.MAX_VALUE ? 0 : minLatency;
         }
    -
    -    synchronized public long getAvgLatency() {
    +    
    +    synchronized public double getAvgLatency() {
             if (count != 0) {
    -            return totalLatency / count;
    +            //be account to four decimal places
    +            return (totalLatency * 10000 / count) / 10000.0;
    --- End diff --
    
    @maoling here is the link: 
    
    
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2198/artifact/build/test/findbugs/newPatchFindbugsWarnings.html


---

Reply via email to