code: private void checkQueueSize() {
          int queueSize = getQueueSize();
          if (WORK_QUEUE_SIZE_WARNING_THRESHOLD > 0 && queueSize >= WORK_QUEUE_SIZE_WARNING_THRESHOLD) {
              logger.warn("The Gerrit incoming events queue contains {} items!"
                          + " Something might be stuck, or your system can't process the commands fast enough."
                          + " Try to increase the number of receiving worker threads."
                          + " Current thread-pool size: {}",
                      queueSize, executor.getPoolSize());
          }
      }
docs: Checks queue size.