List of usage examples for io.netty.buffer PoolChunkListMetric minUsage
int minUsage();
From source file:com.yahoo.pulsar.broker.stats.AllocatorStatsGenerator.java
License:Apache License
private static PoolChunkListStats newPoolChunkListStats(PoolChunkListMetric m) { PoolChunkListStats stats = new PoolChunkListStats(); stats.minUsage = m.minUsage(); stats.maxUsage = m.maxUsage();/*from ww w . ja va 2 s . c om*/ stats.chunks = Lists.newArrayList(); m.forEach(chunk -> stats.chunks.add(newPoolChunkStats(chunk))); return stats; }
From source file:ratpack.dropwizard.metrics.internal.PooledByteBufAllocatorMetricSet.java
License:Apache License
private void initPoolChunkListMetrics(final String prefix, final Iterator<PoolChunkListMetric> chunksIterator) { int counter = 0; while (chunksIterator.hasNext()) { final PoolChunkListMetric poolChunkMetrics = chunksIterator.next(); final String poolChunkPrefix = format("poolChunkList.%s", counter); metrics.put(format("%s.%s.maxUsage", prefix, poolChunkPrefix), (Gauge<Integer>) () -> poolChunkMetrics.maxUsage()); metrics.put(format("%s.%s.minUsage", prefix, poolChunkPrefix), (Gauge<Integer>) () -> poolChunkMetrics.minUsage()); counter++;/*from ww w. j a va 2s.co m*/ } }