@Override public void clientCallback(ClientResponse clientResponse) { assert clientResponse.getResults() != null : "Results were null"; assert clientResponse.getStatus() == 1 : " Result status code was not 1"; if (m_transactionType != null) { m_counts[m_transactionType.ordinal()].incrementAndGet(); } }
@Override public void clientCallback(ClientResponse clientResponse) { // TODO: Necessary? boolean abortExpected = false; if (m_procedureName != null && (m_procedureName.equals(Constants.ORDER_STATUS_BY_NAME) || m_procedureName.equals(Constants.ORDER_STATUS_BY_ID))) abortExpected = true; boolean status = clientResponse.getStatus() == ClientResponse.SUCCESS && abortExpected; assert status; if (m_transactionType != null) { procCounts[m_transactionType.ordinal()].incrementAndGet(); counterLock.lock(); try { totExecutions++; if (checkLatency) { long executionTime = clientResponse.getClientRoundtrip(); totExecutionsLatency++; totExecutionMilliseconds += executionTime; if (executionTime < minExecutionMilliseconds) { minExecutionMilliseconds = executionTime; } if (executionTime > maxExecutionMilliseconds) { maxExecutionMilliseconds = executionTime; } // change latency to bucket int latencyBucket = (int) (executionTime / 25l); if (latencyBucket > 8) { latencyBucket = 8; } latencyCounter[latencyBucket]++; } } finally { counterLock.unlock(); } } }