DistributionStats implements DMStats { @Override public void endReplyWait(long startNanos, long initTime) { if (enableClockStats) { stats.incLong(replyWaitTimeId, getTime() - startNanos); } if (initTime != 0) { long waitTime = System.currentTimeMillis() - initTime; maxReplyWaitTime.recordMax(waitTime); } stats.incInt(replyWaitsInProgressId, -1); stats.incInt(replyWaitsCompletedId, 1); Breadcrumbs.setSendSide(null); Breadcrumbs.setProblem(null); } DistributionStats(StatisticsFactory f, long statId); @VisibleForTesting  DistributionStats(StatisticsFactory factory, String textId, long statId,
      LongSupplier clock); @VisibleForTesting  DistributionStats(Statistics statistics); @VisibleForTesting  DistributionStats(Statistics statistics, LongSupplier clock); static long getStatTime(); void close(); @Override long getSentMessages(); @Override void incTOSentMsg(); @Override long getSentCommitMessages(); @Override long getCommitWaits(); @Override void incSentMessages(long messages); @Override void incSentCommitMessages(long messages); @Override void incCommitWaits(); @Override long getSentMessagesTime(); @Override void incSentMessagesTime(long nanos); @Override long getBroadcastMessages(); @Override void incBroadcastMessages(long messages); @Override long getBroadcastMessagesTime(); @Override void incBroadcastMessagesTime(long nanos); @Override long getReceivedMessages(); @Override void incReceivedMessages(long messages); @Override long getReceivedBytes(); @Override void incReceivedBytes(long bytes); @Override void incSentBytes(long bytes); @Override long getProcessedMessages(); @Override void incProcessedMessages(long messages); @Override long getProcessedMessagesTime(); @Override void incProcessedMessagesTime(long start); @Override long getMessageProcessingScheduleTime(); @Override void incMessageProcessingScheduleTime(long elapsed); @Override int getOverflowQueueSize(); @Override void incOverflowQueueSize(int messages); long getInternalSerialQueueBytes(); @Override int getNumProcessingThreads(); @Override void incNumProcessingThreads(int threads); @Override int getNumSerialThreads(); @Override void incNumSerialThreads(int threads); @Override void incMessageChannelTime(long delta); @Override long startUDPDispatchRequest(); @Override void endUDPDispatchRequest(long start); @Override long getUDPDispatchRequestTime(); @Override long getReplyMessageTime(); @Override void incReplyMessageTime(long val); @Override long getDistributeMessageTime(); @Override void incDistributeMessageTime(long val); @Override int getNodes(); @Override void setNodes(int val); @Override void incNodes(int val); @Override int getReplyWaitsInProgress(); @Override int getReplyWaitsCompleted(); @Override long getReplyWaitTime(); @Override long startSocketWrite(boolean sync); @Override void endSocketWrite(boolean sync, long start, int bytesWritten, int retries); @Override long startSocketLock(); @Override void endSocketLock(long start); @Override long startBufferAcquire(); @Override void endBufferAcquire(long start); @Override void incUcastWriteBytes(int bytesWritten); @Override void incMcastWriteBytes(int bytesWritten); @Override int getMcastWrites(); @Override int getMcastReads(); @Override long getUDPMsgDecryptionTime(); @Override long getUDPMsgEncryptionTiime(); @Override void incMcastReadBytes(int amount); @Override void incUcastReadBytes(int amount); @Override long startSerialization(); @Override void endSerialization(long start, int bytes); @Override long startPdxInstanceDeserialization(); @Override void endPdxInstanceDeserialization(long start); @Override void incPdxSerialization(int bytes); @Override void incPdxDeserialization(int bytes); @Override void incPdxInstanceCreations(); @Override long startDeserialization(); @Override void endDeserialization(long start, int bytes); @Override long startMsgSerialization(); @Override void endMsgSerialization(long start); @Override long startUDPMsgEncryption(); @Override void endUDPMsgEncryption(long start); @Override long startMsgDeserialization(); @Override void endMsgDeserialization(long start); @Override long startUDPMsgDecryption(); @Override void endUDPMsgDecryption(long start); @Override long startReplyWait(); @Override void endReplyWait(long startNanos, long initTime); @Override void incReplyTimeouts(); @Override long getReplyTimeouts(); @Override void incReceivers(); @Override void decReceivers(); @Override void incFailedAccept(); @Override void incFailedConnect(); @Override void incReconnectAttempts(); @Override int getReconnectAttempts(); @Override void incLostLease(); @Override void incSenders(boolean shared, boolean preserveOrder); @Override int getSendersSU(); @Override void decSenders(boolean shared, boolean preserveOrder); @Override int getAsyncSocketWritesInProgress(); @Override int getAsyncSocketWrites(); @Override int getAsyncSocketWriteRetries(); @Override long getAsyncSocketWriteBytes(); @Override long getAsyncSocketWriteTime(); @Override long getAsyncQueueAddTime(); @Override void incAsyncQueueAddTime(long inc); @Override long getAsyncQueueRemoveTime(); @Override void incAsyncQueueRemoveTime(long inc); @Override int getAsyncQueues(); @Override void incAsyncQueues(int inc); @Override int getAsyncQueueFlushesInProgress(); @Override int getAsyncQueueFlushesCompleted(); @Override long getAsyncQueueFlushTime(); @Override long startAsyncQueueFlush(); @Override void endAsyncQueueFlush(long start); @Override int getAsyncQueueTimeouts(); @Override void incAsyncQueueTimeouts(int inc); @Override int getAsyncQueueSizeExceeded(); @Override void incAsyncQueueSizeExceeded(int inc); @Override int getAsyncDistributionTimeoutExceeded(); @Override void incAsyncDistributionTimeoutExceeded(); @Override long getAsyncQueueSize(); @Override void incAsyncQueueSize(long inc); @Override long getAsyncQueuedMsgs(); @Override void incAsyncQueuedMsgs(); @Override long getAsyncDequeuedMsgs(); @Override void incAsyncDequeuedMsgs(); @Override long getAsyncConflatedMsgs(); @Override void incAsyncConflatedMsgs(); @Override int getAsyncThreads(); @Override void incAsyncThreads(int inc); @Override int getAsyncThreadInProgress(); @Override int getAsyncThreadCompleted(); @Override long getAsyncThreadTime(); @Override long startAsyncThread(); @Override void endAsyncThread(long start); ThrottledQueueStatHelper getOverflowQueueHelper(); QueueStatHelper getWaitingQueueHelper(); ThrottledQueueStatHelper getHighPriorityQueueHelper(); ThrottledQueueStatHelper getPartitionedRegionQueueHelper(); PoolStatHelper getPartitionedRegionPoolHelper(); ThrottledQueueStatHelper getFunctionExecutionQueueHelper(); PoolStatHelper getFunctionExecutionPoolHelper(); ThrottledMemQueueStatHelper getSerialQueueHelper(); PoolStatHelper getNormalPoolHelper(); PoolStatHelper getWaitingPoolHelper(); PoolStatHelper getHighPriorityPoolHelper(); @Override void incBatchSendTime(long start); @Override void incBatchCopyTime(long start); @Override void incBatchWaitTime(long start); @Override void incBatchFlushTime(long start); @Override void incUcastRetransmits(); @Override void incMcastRetransmits(); @Override void incMcastRetransmitRequests(); @Override int getMcastRetransmits(); @Override void incThreadOwnedReceivers(long value, int dominoCount); @Override void incReceiverBufferSize(int inc, boolean direct); @Override void incSenderBufferSize(int inc, boolean direct); @Override void incMessagesBeingReceived(boolean newMsg, int bytes); @Override void decMessagesBeingReceived(int bytes); void incSerialThreadStarts(); void incProcessingThreadStarts(); void incHighPriorityThreadStarts(); void incWaitingThreadStarts(); void incPartitionedRegionThreadStarts(); void incFunctionExecutionThreadStarts(); void incSerialPooledThreadStarts(); @Override void incReplyHandOffTime(long start); PoolStatHelper getSerialProcessorHelper(); PoolStatHelper getSerialPooledProcessorHelper(); @Override int getElders(); @Override void incElders(int val); @Override int getInitialImageMessagesInFlight(); @Override void incInitialImageMessagesInFlight(int val); @Override int getInitialImageRequestsInProgress(); @Override void incInitialImageRequestsInProgress(int val); Statistics getStats(); @Override long getHeartbeatRequestsSent(); @Override void incHeartbeatRequestsSent(); @Override long getHeartbeatRequestsReceived(); @Override void incHeartbeatRequestsReceived(); @Override long getHeartbeatsSent(); @Override void incHeartbeatsSent(); @Override long getHeartbeatsReceived(); @Override void incHeartbeatsReceived(); @Override long getSuspectsSent(); @Override void incSuspectsSent(); @Override long getSuspectsReceived(); @Override void incSuspectsReceived(); @Override long getFinalCheckRequestsSent(); @Override void incFinalCheckRequestsSent(); @Override long getFinalCheckRequestsReceived(); @Override void incFinalCheckRequestsReceived(); @Override long getFinalCheckResponsesSent(); @Override void incFinalCheckResponsesSent(); @Override long getFinalCheckResponsesReceived(); @Override void incFinalCheckResponsesReceived(); @Override long getTcpFinalCheckRequestsSent(); @Override void incTcpFinalCheckRequestsSent(); @Override long getTcpFinalCheckRequestsReceived(); @Override void incTcpFinalCheckRequestsReceived(); @Override long getTcpFinalCheckResponsesSent(); @Override void incTcpFinalCheckResponsesSent(); @Override long getTcpFinalCheckResponsesReceived(); @Override void incTcpFinalCheckResponsesReceived(); @Override long getUdpFinalCheckRequestsSent(); @Override void incUdpFinalCheckRequestsSent(); @Override long getUdpFinalCheckResponsesReceived(); @Override void incUdpFinalCheckResponsesReceived(); @MakeNotStatic
  static boolean enableClockStats; }
@Test public void endReplyWait() { distributionStats.endReplyWait(12000000, 12); verify(mockStats).incLong(eq(DistributionStats.replyWaitTimeId), Mockito.anyLong()); verify(mockStats).incLong(eq(DistributionStats.replyWaitMaxTimeId), Mockito.anyLong()); }