Exemplo n.º 1
0
    def test_sys_time_if_previous_value_is_none(self):
        cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository)

        sys_time = cpu_util.sys_time()

        self.assertIsNone(sys_time)
Exemplo n.º 2
0
    def test_sys_time_for_all_cpus(self):
        cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository)

        sys_time = cpu_util.sys_time()

        self.assertEqual(sys_time, 0.41)
Exemplo n.º 3
0
    def test_sys_time(self):
        cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository)

        sys_time = cpu_util.sys_time()

        self.assertEqual(sys_time, 0.82)
Exemplo n.º 4
0
    def test_sys_time_if_previous_value_is_none(self):
        cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository)

        sys_time  = cpu_util.sys_time()

        self.assertIsNone(sys_time)
Exemplo n.º 5
0
    def test_sys_time_for_all_cpus(self):
        cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository)

        sys_time  = cpu_util.sys_time()

        self.assertEqual(sys_time,0.41)
Exemplo n.º 6
0
    def test_sys_time(self):
        cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository)

        sys_time  = cpu_util.sys_time()

        self.assertEqual(sys_time,0.82)