ServerStats { synchronized public void reset() { resetLatency(); resetRequestCounters(); clientResponseStats.reset(); } ServerStats(Provider provider); synchronized long getMinLatency(); synchronized long getAvgLatency(); synchronized long getMaxLatency(); long getOutstandingRequests(); long getLastProcessedZxid(); long getDataDirSize(); long getLogDirSize(); synchronized long getPacketsReceived(); synchronized long getPacketsSent(); String getServerState(); int getNumAliveClientConnections(); boolean isProviderNull(); @Override String toString(); synchronized void resetLatency(); synchronized void resetMaxLatency(); synchronized void incrementPacketsReceived(); synchronized void incrementPacketsSent(); synchronized void resetRequestCounters(); long getFsyncThresholdExceedCount(); void incrementFsyncThresholdExceedCount(); void resetFsyncThresholdExceedCount(); synchronized void reset(); void updateClientResponseSize(int size); BufferStats getClientResponseStats();  }
@Test public void testReset() { ServerStats serverStats = new ServerStats(providerMock); assertAllPacketsZero(serverStats); assertAllLatencyZero(serverStats); serverStats.incrementPacketsSent(); serverStats.incrementPacketsReceived(); serverStats.updateLatency(Time.currentElapsedTime()-1000); serverStats.reset(); assertAllPacketsZero(serverStats); assertAllLatencyZero(serverStats); }