protected int getAcceptsInProgress() { StatisticsType st = InternalDistributedSystem.getAnyInstance().findType("CacheServerStats"); Statistics[] s = InternalDistributedSystem.getAnyInstance().findStatisticsByType(st); return s[0].getInt("acceptsInProgress"); }
public void run2() throws CacheException { // wait for 2 samples to ensure all stats have been archived final StatisticsType statSamplerType = getSystem().findType("StatSampler"); final Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType); assertEquals(1, statsArray.length); final Statistics statSamplerStats = statsArray[0]; final int initialSampleCount = statSamplerStats.getInt(StatSamplerStats.SAMPLE_COUNT); final WaitCriterion wc = new WaitCriterion() { public boolean done() { return statSamplerStats.getInt(StatSamplerStats.SAMPLE_COUNT) >= initialSampleCount + 2; } public String description() { return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2; } }; waitForCriterion(wc, 4*1000, 10, true); // now post total updateEvents to static final PubSubStats statistics = subStatsRef.get(); assertNotNull(statistics); updateEvents.set(statistics.getUpdateEvents()); } });
protected int getSampleCount() { final StatisticsType type = getSystem().findType("StatSampler"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics statSampler = stats[0]; int result = statSampler.getInt("sampleCount"); return result; }
protected long getCpu() { final StatisticsType type = getSystem().findType("VMStats"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics vmStats = stats[0]; return vmStats.getLong("processCpuTime"); }
protected long getCpu() { final StatisticsType type = getSystem().findType("VMStats"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics vmStats = stats[0]; long result = vmStats.getLong("processCpuTime"); //getSystem().getLogWriter().info("getCpu returned " + result); return result; } protected int getSampleCount() {
StatisticsType st = InternalDistributedSystem.getAnyInstance().findType("CacheServerStats"); Statistics[] s = InternalDistributedSystem.getAnyInstance().findStatisticsByType(st); int NumberOfOutOfOrderBatchIds = s[0].getInt("outOfOrderGatewayBatchIds");
final StatisticsType statSamplerType = getSystem().findType("StatSampler"); final Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType); assertEquals(1, statsArray.length);
private NetworkServerConnectionStats getMemberClientConnectionStats(InternalDistributedSystem system){ NetworkServerConnectionStats clientConnectionStats = new NetworkServerConnectionStats("Client", ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO); StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType); for (Statistics statistics : foundStatistics) { clientConnectionStats.updateNetworkServerConnectionStats( statistics.getLong("clientConnectionsOpened"), statistics.getLong("clientConnectionsClosed"), statistics.getLong("clientConnectionsAttempted"), statistics.getLong("clientConnectionsFailed"), statistics.getLong("clientConnectionsLifeTime"), statistics.getLong("clientConnectionsOpen"), statistics.getLong("clientConnectionsIdle") ); } } return clientConnectionStats; }
if (cache != null) { InternalDistributedSystem system = cache.getDistributedSystem(); StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);
if (cache != null) { InternalDistributedSystem system = cache.getDistributedSystem(); StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);
if (cache != null) { InternalDistributedSystem system = cache.getDistributedSystem(); StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);