private synchronized Result aggregateHistogramsForTestCase( String testCaseId, PerformanceState state) { if (state == null) { return new ResultImpl(testCaseId, 0, 0.0d); } Result result = new ResultImpl(testCaseId, state.getOperationCount(), state.getTotalThroughput()); for (ConcurrentMap<String, Map<String, String>> testHistogramMap : workerTestProbeHistogramMap.values()) { Map<String, String> probeHistogramMap = testHistogramMap.get(testCaseId); if (probeHistogramMap == null) { continue; } for (Map.Entry<String, String> mapEntry : probeHistogramMap.entrySet()) { String probeName = mapEntry.getKey(); String encodedHistogram = mapEntry.getValue(); try { ByteBuffer buffer = ByteBuffer.wrap(parseBase64Binary(encodedHistogram)); Histogram histogram = decodeFromCompressedByteBuffer(buffer, 0); result.addHistogram(probeName, histogram); } catch (Exception e) { LOGGER.warn( "Could not decode histogram from test " + testCaseId + " of probe " + probeName); } } } return result; }