protected LocalMapStatsProvider createLocalMapStatsProvider() { return new LocalMapStatsProvider(this); }
public LocalMapStatsImpl createLocalMapStats(String mapName) { LocalMapStatsImpl stats = getLocalMapStatsImpl(mapName); LocalMapOnDemandCalculatedStats onDemandStats = new LocalMapOnDemandCalculatedStats(); addNearCacheStats(mapName, stats, onDemandStats); addIndexStats(mapName, stats); updateMapOnDemandStats(mapName, onDemandStats); return onDemandStats.updateAndGet(stats); }
@Override public Map<String, LocalMapStats> getStats() { LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); return localMapStatsProvider.createAllLocalMapStats(); } }
Collection<RecordStore> allRecordStores = partitionContainer.getAllRecordStores(); for (RecordStore recordStore : allRecordStores) { if (!isStatsCalculationEnabledFor(recordStore)) { continue; addPrimaryStatsOf(recordStore, getOrCreateOnDemandStats(statsPerMap, recordStore)); } else { addReplicaStatsOf(recordStore, getOrCreateOnDemandStats(statsPerMap, recordStore)); Map.Entry entry = (Map.Entry) object; String mapName = ((String) entry.getKey()); LocalMapStatsImpl existingStats = getLocalMapStatsImpl(mapName); LocalMapOnDemandCalculatedStats onDemand = ((LocalMapOnDemandCalculatedStats) entry.getValue()); addNearCacheStats(mapName, existingStats, onDemand); addIndexStats(mapName, existingStats); addStructureStats(mapName, onDemand); addStatsOfNoDataIncludedMaps(statsPerMap);
private void updateMapOnDemandStats(String mapName, LocalMapOnDemandCalculatedStats onDemandStats) { PartitionContainer[] partitionContainers = mapServiceContext.getPartitionContainers(); for (PartitionContainer partitionContainer : partitionContainers) { IPartition partition = partitionService.getPartition(partitionContainer.getPartitionId()); if (partition.isLocal()) { addPrimaryStatsOf(partitionContainer.getExistingRecordStore(mapName), onDemandStats); } else { addReplicaStatsOf(partitionContainer.getExistingRecordStore(mapName), onDemandStats); } } addStructureStats(mapName, onDemandStats); }
localMapStats.setQueryCount(globalIndexes.getIndexesStats().getQueryCount()); localMapStats.setIndexedQueryCount(globalIndexes.getIndexesStats().getIndexedQueryCount()); freshStats = aggregateFreshIndexStats(globalIndexes.getIndexes(), null); finalizeFreshIndexStats(freshStats); } else { long queryCount = 0; indexedQueryCount = Math.max(indexedQueryCount, indexesStats.getIndexedQueryCount()); freshStats = aggregateFreshIndexStats(partitionIndexes.getIndexes(), freshStats); localMapStats.setIndexedQueryCount(indexedQueryCount); finalizeFreshIndexStats(freshStats);
@Override public LocalMapStats getLocalMapStats() { if (!mapConfig.isStatisticsEnabled()) { return EMPTY_LOCAL_MAP_STATS; } return mapServiceContext.getLocalMapStatsProvider().createLocalMapStats(name); }
Collection<RecordStore> allRecordStores = partitionContainer.getAllRecordStores(); for (RecordStore recordStore : allRecordStores) { if (!isStatsCalculationEnabledFor(recordStore)) { continue; addPrimaryStatsOf(recordStore, getOrCreateOnDemandStats(statsPerMap, recordStore)); } else { addReplicaStatsOf(recordStore, getOrCreateOnDemandStats(statsPerMap, recordStore)); Map.Entry entry = (Map.Entry) object; String mapName = ((String) entry.getKey()); LocalMapStatsImpl existingStats = getLocalMapStatsImpl(mapName); LocalMapOnDemandCalculatedStats onDemand = ((LocalMapOnDemandCalculatedStats) entry.getValue()); addNearCacheStats(mapName, existingStats, onDemand); addIndexStats(mapName, existingStats); addStructureStats(mapName, onDemand); addStatsOfNoDataIncludedMaps(statsPerMap);
private void updateMapOnDemandStats(String mapName, LocalMapOnDemandCalculatedStats onDemandStats) { PartitionContainer[] partitionContainers = mapServiceContext.getPartitionContainers(); for (PartitionContainer partitionContainer : partitionContainers) { IPartition partition = partitionService.getPartition(partitionContainer.getPartitionId()); if (partition.isLocal()) { addPrimaryStatsOf(partitionContainer.getExistingRecordStore(mapName), onDemandStats); } else { addReplicaStatsOf(partitionContainer.getExistingRecordStore(mapName), onDemandStats); } } addStructureStats(mapName, onDemandStats); }
localMapStats.setQueryCount(globalIndexes.getIndexesStats().getQueryCount()); localMapStats.setIndexedQueryCount(globalIndexes.getIndexesStats().getIndexedQueryCount()); freshStats = aggregateFreshIndexStats(globalIndexes.getIndexes(), null); finalizeFreshIndexStats(freshStats); } else { long queryCount = 0; indexedQueryCount = Math.max(indexedQueryCount, indexesStats.getIndexedQueryCount()); freshStats = aggregateFreshIndexStats(partitionIndexes.getIndexes(), freshStats); localMapStats.setIndexedQueryCount(indexedQueryCount); finalizeFreshIndexStats(freshStats);
@Override public LocalMapStats getLocalMapStats() { if (!mapConfig.isStatisticsEnabled()) { return EMPTY_LOCAL_MAP_STATS; } return mapServiceContext.getLocalMapStatsProvider().createLocalMapStats(name); }
public LocalMapStatsImpl createLocalMapStats(String mapName) { LocalMapStatsImpl stats = getLocalMapStatsImpl(mapName); LocalMapOnDemandCalculatedStats onDemandStats = new LocalMapOnDemandCalculatedStats(); addNearCacheStats(mapName, stats, onDemandStats); addIndexStats(mapName, stats); updateMapOnDemandStats(mapName, onDemandStats); return onDemandStats.updateAndGet(stats); }
@Override public Map<String, LocalMapStats> getStats() { LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); return localMapStatsProvider.createAllLocalMapStats(); } }
protected LocalMapStatsProvider createLocalMapStatsProvider() { return new LocalMapStatsProvider(this); }