Ejemplo n.º 1
0
    def setCPULoadAvg(self, cpu_load):
        util.assertContainsType(cpu_load, float, \
            "Expected floating point numbers")
        if len(cpu_load) != 3:
            raise Exception("Expected a tuple of 3 float values")

        self._cpu_load_avg = cpu_load
Ejemplo n.º 2
0
    def setFinishedProcesses(self, procs):
        util.assertContainsType(procs, tuple, "Expected tuples (int, str)")

        if isinstance(procs, frozenset):
            self._finished_procs = procs
        else:
            self._finished_procs = frozenset(procs)
Ejemplo n.º 3
0
    def setUsedCPUPercentage(self, cpu_usage):
        util.assertContainsType(cpu_usage, float, \
            "Expected floating point numbers")

        self._cpu_usage_percent = tuple( used for used in cpu_usage )