@Override
  public Collection<? extends Result<?>> afterIteration(final BenchmarkParams benchmarkParams,
      final IterationParams iterationParams,
      final IterationResult result) {
    final List<Result<?>> results = new ArrayList<>();
    for (Map.Entry<String, Object> entry : objects.entrySet()) {
      result.addResult(new ScalarResult("objectSize." + entry.getKey(),
          sizeOfDeep(entry.getValue()), "bytes", AggregationPolicy.AVG));
    }
    return results;
  }
Registers the named object for size profiling.

@param name of object to size.
@param object to size.
geode-jmh/src/main/java/org/apache/geode/benchmark/jmh/profilers/ObjectSizeProfiler.java