code: private double slotsUsedWithWeightToSlotRatio(double w2sRatio, TaskType type) {
      double slotsTaken = 0;
      for (JobInfo info : infos.values()) {
        slotsTaken += computeShare(info, w2sRatio, type);
      }
      return slotsTaken;
    }
docs: Compute the number of slots that would be used given a weight-to-slot
  ratio w2sRatio.