zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardoliveira <...@git.apache.org>
Subject [GitHub] zookeeper pull request #501: ZOOKEEPER-3019 add metric for slow fsyncs count
Date Thu, 12 Apr 2018 15:44:25 GMT
Github user edwardoliveira commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/501#discussion_r181129644
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ServerStats.java ---
    @@ -148,9 +150,23 @@ synchronized public void resetRequestCounters(){
             packetsReceived = 0;
             packetsSent = 0;
         }
    +
    +    public long getFsyncThresholdExceedCount() {
    +        return fsyncThresholdExceedCount;
    +    }
    +
    +    synchronized public void increaseFsyncThresholdExceedCount() {
    +        fsyncThresholdExceedCount++;
    +    }
    +
    +    synchronized void resetFsyncThresholdExceedCount() {
    --- End diff --
    
    It would be nice to expose this method via JMX too, imho.


---

Mime
View raw message