@Setup(Level.Trial)
  public void trialSetup() throws InterruptedException {
    DistributedSystem mockDS = mock(DistributedSystem.class);
    Cache mockCache = mock(Cache.class);
    Region mockRegion = mock(Region.class);
    when(mockRegion.getCache()).thenReturn(mockCache);
    when(mockCache.getDistributedSystem()).thenReturn(mockDS);
    index = new PartitionedIndex(null, null, "", mockRegion, "", "", "");
    index.addToBucketIndexes(mockRegion, mock(Index.class));
  }
Test spins up threads that constantly do getBucketIndex
The tests will measure throughput
The benchmark tests getBucketIndex in the presence of other threads attempting the same operation
geode-core/src/jmh/java/org/apache/geode/cache/query/internal/PartitionedIndexGetBucketIndexBenchmark.java