public synchronized Map<String, Integer> getStats() {
    Map<String, Integer> stats = new HashMap<String, Integer>();
    for (int i = 0; i < mBuckets.size(); ++i) {
      final int bucketedSize = mBuckets.keyAt(i);
      final Bucket<V> bucket = Preconditions.checkNotNull(mBuckets.valueAt(i));
      final String BUCKET_USED_KEY =
          PoolStatsTracker.BUCKETS_USED_PREFIX + getSizeInBytes(bucketedSize);
      stats.put(BUCKET_USED_KEY, bucket.getInUseCount());
    }

    stats.put(PoolStatsTracker.SOFT_CAP, mPoolParams.maxSizeSoftCap);
    stats.put(PoolStatsTracker.HARD_CAP, mPoolParams.maxSizeHardCap);
    stats.put(PoolStatsTracker.USED_COUNT, mUsed.mCount);
    stats.put(PoolStatsTracker.USED_BYTES, mUsed.mNumBytes);
    stats.put(PoolStatsTracker.FREE_COUNT, mFree.mCount);
    stats.put(PoolStatsTracker.FREE_BYTES, mFree.mNumBytes);

    return stats;
  }
Export memory stats regarding buckets used, memory caps, reused values.
imagepipeline/src/main/java/com/facebook/imagepipeline/memory/BasePool.java