private static long sleepUntilUpdatesQueueIsShrunk(int writesToWakeUp, long napTimeNs) {
    var sleepStart = System.nanoTime();
    int iterations = 1;
    while (writesToWakeUp < INDEX_WRITES_QUEUED.get()) {
      LockSupport.parkNanos(napTimeNs * iterations);
      iterations++;
    }
    return (System.nanoTime() - sleepStart) / 1_000_000;
  }
private static long sleepUntilUpdatesQueueIsShrunk(int writesToWakeUp, long napTimeNs)