private void setTransactionDisplayNames() { procNames = new String[TPCCSimulation.Transaction.values().length]; procCounts = new AtomicLong[procNames.length]; for (int ii = 0; ii < TPCCSimulation.Transaction.values().length; ii++) { procNames[ii] = TPCCSimulation.Transaction.values()[ii].displayName; procCounts[ii] = new AtomicLong(0L); } }
@Override protected String[] getTransactionDisplayNames() { String countDisplayNames[] = new String[TPCCSimulation.Transaction.values().length]; for (int ii = 0; ii < TPCCSimulation.Transaction.values().length; ii++) { countDisplayNames[ii] = TPCCSimulation.Transaction.values()[ii].displayName; } return countDisplayNames; }
@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(); } } }