Class CgroupCpuMonitor

    • Method Detail

      • computeProcessorQuota

        public static double computeProcessorQuota​(long quotaUs,
                                                   long periodUs)
        Calculates the total cores allocated through quotas. A negative value indicates that no quota has been specified. We use -1 because that's the default value used in the cgroup.
        Parameters:
        quotaUs - the cgroup quota value.
        periodUs - the cgroup period value.
        Returns:
        the calculated processor quota, -1 if no quota or period set.