Returns the max allowed concurrent executions.
480991
int maxConcurrentExecutions() {
    if (circuit.getSuccessThreshold() != null)
      return circuit.getSuccessThreshold().getDenominator();
    else if (circuit.getFailureThreshold() != null)
      return circuit.getFailureThreshold().getDenominator();
    else
      return 1;
  }
1187272
int refreshAndGetMax() {
		int max = 0;

		for (InputChannel channel : inputGate.getInputChannels().values()) {
			if (channel instanceof RemoteInputChannel) {
				RemoteInputChannel rc = (RemoteInputChannel) channel;

				int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
				max = Math.max(max, size);
			}
		}

		return max;
	}
25348
def _max_timestamps(dirname_full, remove, compare_tstamp):
    """"""
    tstamp = _get_timestamp_cached(dirname_full, remove)
    return max_none((tstamp, compare_tstamp))
121203
public Long getMax() {
		return processFunction(new AbstractSplitFunction<Long>(Long.MIN_VALUE) {
			@Override
			public void evaluate(long runningFor) {
				if (runningFor > result) {
					result = runningFor;
				}
			}
		});
	}
469171
def check(self):
        
        current = self._get_current()
        highest = self._get_highest_version()
        return highest > current
1166724
def get_limits(self):
        
        vals = self._hook_manager.call_hook('task_limits', course=self.get_course(), task=self, default=self._limits)
        return vals[0] if len(vals) else self._limits
396787
@Override
    public long getMaxX() {
        if (!excludeOutOfRangeValues) {
            return super.getMaxX();
        } else {
            long retMax = 0;
            Iterator<Long> iter = values.keySet().iterator();

            if (iter.hasNext()) {
                retMax = iter.next();
            }
            long excludeValue = getGranulationValue() * excludeCount;
            while (iter.hasNext()) {
                long value = iter.next();

                if (value > retMax) {
                    if ((value - retMax) < excludeValue) {
                        retMax = value;
                    }
                }
            }
            return retMax;
        }
    }
1100981
def getMaxTimeAllowed(self):
        
        tat = self.Schema().getField("MaxTimeAllowed").get(self)
        return tat or self.bika_setup.getDefaultTurnaroundTime()
468142
public T max() {
        TObjectIntIterator<T> iter = counts.iterator();
        int maxCount = -1;
        T max = null;
        while (iter.hasNext()) {
            iter.advance();
            int count = iter.value();
            if (count > maxCount) {
                max = iter.key();
                maxCount = count;
            }
        }
        return max;
    }
1196708
static long getTotalMaxUsage(Map<String, MemoryUsage> usages) {
    long sum = 0L;
    for (Map.Entry<String, MemoryUsage> e : usages.entrySet()) {
      long max = e.getValue().getMax();
      if (max > 0) {
        sum += e.getValue().getMax();
      }
    }
    return sum;
  }
786728
def refreshMinMax(self):
        
        if self.getRefreshBlocked():
            logger.debug("refreshMinMax blocked for {}".format(self.nodeName))
            return

        self._forceRefreshMinMax()
1072126
public long maxTimestamp()
  {
    return ranges == null
            ? topLevel.markedForDeleteAt
            : Math.max(topLevel.markedForDeleteAt, ranges.maxMarkedAt());
  }
193482
def max_order(self):
        
        # TODO: cache value
        combo = int(0)
        for iv in self._interval_set._intervals:
            combo |= iv[0] | iv[1]

        ret = AbstractMOC.HPY_MAX_NORDER - (utils.number_trailing_zeros(combo) // 2)
        if ret < 0:
            ret = 0

        return ret
1129241
def max_version(self):
        
        data = self.version_downloads
        if not data:
            return None, 0
        return max(data.items(), key=lambda item: item[1])
439855
private void enforceTimeLimits()
    {
        for (T query : queries.values()) {
            if (query.isDone()) {
                continue;
            }
            Duration queryMaxRunTime = getQueryMaxRunTime(query.getSession());
            Duration queryMaxExecutionTime = getQueryMaxExecutionTime(query.getSession());
            Optional<DateTime> executionStartTime = query.getExecutionStartTime();
            DateTime createTime = query.getCreateTime();
            if (executionStartTime.isPresent() && executionStartTime.get().plus(queryMaxExecutionTime.toMillis()).isBeforeNow()) {
                query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "Query exceeded the maximum execution time limit of " + queryMaxExecutionTime));
            }
            if (createTime.plus(queryMaxRunTime.toMillis()).isBeforeNow()) {
                query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "Query exceeded maximum time limit of " + queryMaxRunTime));
            }
        }
    }
751978
def get_maxweight(self, weight, concurrent_tasks, minweight=MINWEIGHT):
        
        totweight = self.get_weight(weight)
        ct = concurrent_tasks or 1
        mw = math.ceil(totweight / ct)
        return max(mw, minweight)
812598
def _GetSubFlowCPULimit(self):
    """"""

    subflow_cpu_limit = None

    if self.runner_args.per_client_cpu_limit:
      subflow_cpu_limit = self.runner_args.per_client_cpu_limit

    if self.runner_args.cpu_limit:
      cpu_usage_data = self.context.client_resources.cpu_usage
      remaining_cpu_quota = (
          self.runner_args.cpu_limit - cpu_usage_data.user_cpu_time -
          cpu_usage_data.system_cpu_time)
      if subflow_cpu_limit is None:
        subflow_cpu_limit = remaining_cpu_quota
      else:
        subflow_cpu_limit = min(subflow_cpu_limit, remaining_cpu_quota)

      if subflow_cpu_limit == 0:
        raise RuntimeError("Out of CPU quota.")

    return subflow_cpu_limit