@Override public CacheStatistics getCacheStatistics() { CacheStatistics keyReaderCacheStatistics = keyFileReader.getCacheStatistics(); return new CacheStatistics( keyReaderCacheStatistics.getNumItems() + cache.size(), keyReaderCacheStatistics.getMaxNumItems() + cache.getMaxNumItems(), keyReaderCacheStatistics.getNumManagedBytes() + cache.getNumManagedBytes(), keyReaderCacheStatistics.getMaxNumManagedBytes() + cache.getMaxNumManagedBytes()); }
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 String toString(RuntimeStatisticsAggregator runtimeStatisticsAggregator) { return runtimeStatisticsAggregator.throughputTotal + " " + runtimeStatisticsAggregator.responseDataThroughputTotal + " " + runtimeStatisticsAggregator.numRequestsTotal + " " + runtimeStatisticsAggregator.numHitsTotal + " " + runtimeStatisticsAggregator.numL1CacheHitsTotal + " " + runtimeStatisticsAggregator.numL2CacheHitsTotal + " " + runtimeStatisticsAggregator.cacheStatisticsTotal.getNumItems() + " " + runtimeStatisticsAggregator.cacheStatisticsTotal.getMaxNumItems() + " " + runtimeStatisticsAggregator.cacheStatisticsTotal.getNumManagedBytes() + " " + runtimeStatisticsAggregator.cacheStatisticsTotal.getMaxNumManagedBytes() + " " + DoublePopulationStatisticsAggregator.toString( runtimeStatisticsAggregator.getRequestsPopulationStatistics); }
public RuntimeStatisticsAggregator() { throughputTotal = 0; responseDataThroughputTotal = 0; numRequestsTotal = 0; numHitsTotal = 0; numL1CacheHitsTotal = 0; numL2CacheHitsTotal = 0; getRequestsPopulationStatistics = new DoublePopulationStatisticsAggregator(); cacheStatisticsTotal = new CacheStatistics(0, 0, 0, 0); }
long numL2CacheHitsTotal = Long.parseLong(tokens[5]); CacheStatistics cacheStatisticsTotal = new CacheStatistics( Long.parseLong(tokens[6]), Long.parseLong(tokens[7]),
@Override public CacheStatistics getCacheStatistics() { return new CacheStatistics( cache.size(), cache.getMaxNumItems(), cache.getNumManagedBytes(), cache.getMaxNumManagedBytes()); }
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; }
public void putToStatistics(DomainStatisticsSummary summary){ summary.set_throughput_total(throughputTotal); summary.set_response_data_throughput_total(responseDataThroughputTotal); summary.set_num_requests_total(numRequestsTotal); summary.set_num_hits_total(numHitsTotal); summary.set_num_l1_cache_hits_total(numL1CacheHitsTotal); summary.set_num_l2_cache_hits_total(numL2CacheHitsTotal); summary.set_cache_num_items(cacheStatisticsTotal.getNumItems()); summary.set_cache_max_num_items(cacheStatisticsTotal.getMaxNumItems()); summary.set_cache_num_managed_bytes(cacheStatisticsTotal.getNumManagedBytes()); summary.set_cache_max_num_managed_bytes(cacheStatisticsTotal.getMaxNumManagedBytes()); summary.set_latency_summary(getRequestsPopulationStatistics.getStatistics()); }