protected void monitorStatistics(final long millisTimeStamp, final List<ResourceInstance> resourceInstances) { if (!this.statistics.isEmpty()) { Map<StatisticId, Number> stats = new HashMap<>(); for (ResourceInstance resource : resourceInstances) { if (this.statistics.contains(resource.getStatistics())) { ResourceType resourceType = resource.getResourceType(); StatisticDescriptor[] sds = resourceType.getStatisticDescriptors(); int[] updatedStats = resource.getUpdatedStats(); for (int i = 0; i < updatedStats.length; i++) { int idx = updatedStats[i]; StatisticDescriptorImpl sdi = (StatisticDescriptorImpl) sds[idx]; SimpleStatisticId statId = new SimpleStatisticId(sdi, resource.getStatistics()); long rawbits = resource.getLatestStatValues()[idx]; stats.put(statId, sdi.getNumberForRawBits(rawbits)); } } } if (!stats.isEmpty()) { MapBasedStatisticsNotification notification = new MapBasedStatisticsNotification( millisTimeStamp, StatisticsNotification.Type.VALUE_CHANGED, stats); notifyListeners(notification); } } }
StatisticDescriptor[] stats = ri.getResourceType().getStatisticDescriptors(); if (ri.getStatistics().isClosed()) { continue;
"StatArchiveWriter#allocatedResourceType resourceType={}", resourceType); if (resourceType.getStatisticDescriptors().length >= ILLEGAL_STAT_OFFSET) { throw new InternalGemFireException( String.format("Could not archive type %s because it had more than %s statistics.", this.dataOut.writeUTF(resourceType.getStatisticsType().getName()); this.dataOut.writeUTF(resourceType.getStatisticsType().getDescription()); StatisticDescriptor[] stats = resourceType.getStatisticDescriptors(); this.dataOut.writeShort(stats.length); if (this.trace && (traceStatisticsTypeName == null
return; StatisticDescriptor[] stats = ri.getResourceType().getStatisticDescriptors(); if (stats.length > 254) { throw new Error("StatisticsType " + ri.getResourceType().getStatisticsType().getName()
"StatArchiveWriter#allocatedResourceInstance statResource={}", statResource); if (statResource.getResourceType().getStatisticDescriptors().length >= ILLEGAL_STAT_OFFSET) { throw new InternalGemFireException( String.format("Could not archive type %s because it had more than %s statistics.",
assertNotNull(resourceType); assertEquals(0, resourceType.getId()); assertEquals(1, resourceType.getStatisticDescriptors().length); StatisticsType statisticsType = resourceType.getStatisticsType(); assertNotNull(statisticsType);
assertNotNull(resourceType); assertEquals(0, resourceType.getId()); assertEquals(1, resourceType.getStatisticDescriptors().length); StatisticsType statisticsType = resourceType.getStatisticsType(); assertNotNull(statisticsType); assertNotNull(resourceType); assertEquals(1, resourceType.getId()); assertEquals(1, resourceType.getStatisticDescriptors().length); statisticsType = resourceType.getStatisticsType(); assertNotNull(statisticsType);