code: protected LoadStatisticsSnapshot computeSnapshot(Iterable<Queue.BuildableItem> queue) {
          final LoadStatisticsSnapshot.Builder builder = LoadStatisticsSnapshot.builder();
          final Iterable<Node> nodes = getNodes();
          if (nodes != null) {
              for (Node node : nodes) {
                  builder.with(node);
              }
          }
          int q = 0;
          if (queue != null) {
              for (Queue.BuildableItem item : queue) {
                  
                  for (SubTask st : item.task.getSubTasks()) {
                      if (matches(item, st))
                          q++;
                  }
              }
          }
          return builder.withQueueLength(q).build();
      }
docs: Computes the self-consistent snapshot with the specified queue items.
  
  @param queue the queue items.
  @return a self-consistent snapshot of the load statistics.
  @since 1.607