public void add(PartitionAccessorRuntimeStatistics runtimeStatistics) { throughputTotal += runtimeStatistics.throughput; responseDataThroughputTotal += runtimeStatistics.responseDataThroughput; numRequestsTotal += runtimeStatistics.numRequests; numHitsTotal += runtimeStatistics.numHits; numL1CacheHitsTotal += runtimeStatistics.numL1CacheHits; numL2CacheHitsTotal += runtimeStatistics.numL2CacheHits; cacheStatisticsTotal.add(runtimeStatistics.cacheStatistics); }
public static RuntimeStatisticsAggregator combine(Collection<RuntimeStatisticsAggregator> runtimeStatisticsAggregators) { RuntimeStatisticsAggregator result = new RuntimeStatisticsAggregator(); List<DoublePopulationStatisticsAggregator> doublePopulationStatisticsAggregators = new ArrayList<DoublePopulationStatisticsAggregator>(runtimeStatisticsAggregators.size()); for (RuntimeStatisticsAggregator runtimeStatisticsAggregator : runtimeStatisticsAggregators) { result.throughputTotal += runtimeStatisticsAggregator.throughputTotal; result.responseDataThroughputTotal += runtimeStatisticsAggregator.responseDataThroughputTotal; result.numRequestsTotal += runtimeStatisticsAggregator.numRequestsTotal; result.numHitsTotal += runtimeStatisticsAggregator.numHitsTotal; result.numL1CacheHitsTotal += runtimeStatisticsAggregator.numL1CacheHitsTotal; result.numL2CacheHitsTotal += runtimeStatisticsAggregator.numL2CacheHitsTotal; doublePopulationStatisticsAggregators.add(runtimeStatisticsAggregator.getRequestsPopulationStatistics); result.cacheStatisticsTotal.add(runtimeStatisticsAggregator.cacheStatisticsTotal); } result.getRequestsPopulationStatistics = DoublePopulationStatisticsAggregator.combine(doublePopulationStatisticsAggregators); return result; }