public void run() {
      try {
        System.out.println("Starting index read performance");
        System.out.flush();
        while (!isShutdown.get()) {

          synchronized (hashes) {
            // choose a random index
            int indexToUse = new Random().nextInt(hashes.size());
            IndexPayload index = (IndexPayload) hashes.values().toArray()[indexToUse];
            if (index.getIds().size() == 0) {
              continue;
            }
            int idToUse = new Random().nextInt(index.getIds().size());
            String idToLookup = (String) index.getIds().toArray()[idToUse];

            if (index.getIndex().findKey(new BlobId(idToLookup, map)) == null) {
              System.out.println("Error id not found in index " + idToLookup);
            } else {
              System.out.println("found id " + idToLookup);
            }
            throttler.maybeThrottle(1);
          }
          Thread.sleep(1000);
        }
      } catch (Exception e) {
        System.out.println("Exiting index read perf thread " + e.getCause());
      } finally {
        latch.countDown();
      }
    }
Reads from a file and populates the indexes and issues
random read requests and tracks performance . This test reads 10000 ids
at a time from the index write performance log and does random reads from that list.
After 2 minutes it replaces the input with the next 10000 set.
ambry-tools/src/main/java/com/github/ambry/store/IndexReadPerformance.java