@Override
  public void beforeIteration(final BenchmarkParams benchmarkParams,
      final IterationParams iterationParams) {
    int i = 0;
    for (final BufferPoolMXBean pool : pools) {
      previousCount[i] = pool.getCount();
      previousMemoryUsed[i] = pool.getMemoryUsed();
      previousTotalCapacity[i] = pool.getTotalCapacity();
      ++i;
    }
  }
JMH profiler for JVM buffer pools using statistics available from {@link BufferPoolMXBean}.
geode-jmh/src/main/java/org/apache/geode/benchmark/jmh/profilers/BufferPoolProfiler.java