private void runTest(Path path, DataBlockEncoding blockEncoding, List<ExtendedCell> seeks)
    throws IOException {
    // read all of the key values
    StoreFileInfo storeFileInfo = StoreFileInfo.createStoreFileInfoForHFile(configuration,
      testingUtility.getTestFileSystem(), path, true);
    HStoreFile storeFile = new HStoreFile(storeFileInfo, BloomType.NONE, cacheConf);
    storeFile.initReader();
    long totalSize = 0;

    StoreFileReader reader = storeFile.getReader();
    StoreFileScanner scanner = reader.getStoreFileScanner(true, false, false, 0, 0, false);

    long startReadingTime = System.nanoTime();
    ExtendedCell current;
    scanner.seek(KeyValue.LOWESTKEY);
    while (null != (current = scanner.next())) { // just iterate it!
      if (KeyValueUtil.ensureKeyValue(current).getLength() < 0) {
        throw new IOException("Negative KV size: " + current);
      }
      totalSize += KeyValueUtil.ensureKeyValue(current).getLength();
    }
    long finishReadingTime = System.nanoTime();

    // do seeks
    long startSeeksTime = System.nanoTime();
    for (ExtendedCell keyValue : seeks) {
      scanner.seek(keyValue);
      ExtendedCell toVerify = scanner.next();
      if (!keyValue.equals(toVerify)) {
        System.out
          .println(String.format("KeyValue doesn't match:\n" + "Orig key: %s\n" + "Ret key:  %s",
            KeyValueUtil.ensureKeyValue(keyValue).getKeyString(),
            KeyValueUtil.ensureKeyValue(toVerify).getKeyString()));
        break;
      }
    }
    long finishSeeksTime = System.nanoTime();
    if (finishSeeksTime < startSeeksTime) {
      throw new AssertionError(
        "Finish time " + finishSeeksTime + " is earlier than start time " + startSeeksTime);
    }

    // write some stats
    double readInMbPerSec =
      (totalSize * NANOSEC_IN_SEC) / (BYTES_IN_MEGABYTES * (finishReadingTime - startReadingTime));
    double seeksPerSec = (seeks.size() * NANOSEC_IN_SEC) / (finishSeeksTime - startSeeksTime);

    storeFile.closeStoreFile(cacheConf.shouldEvictOnClose());
    clearBlockCache();

    System.out.println(blockEncoding);
    System.out.printf("  Read speed:       %8.2f (MB/s)\n", readInMbPerSec);
    System.out.printf("  Seeks per second: %8.2f (#/s)\n", seeksPerSec);
    System.out.printf("  Total KV size:    %d\n", totalSize);
  }
Use this benchmark with default options
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/EncodedSeekPerformanceTest.java