def test_idle_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time, 0.11)
def test_nice_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time, 0.3)
def test_irq_soft_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) irq_soft = cpu_util.irq_soft() self.assertEqual(irq_soft, 0.07)
def test_irq_soft(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) irq_soft = cpu_util.irq_soft() self.assertEqual(irq_soft, 0.15)
def test_idle_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time, 0.22)
def test_user_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) user_time = cpu_util.user_time() self.assertEqual(user_time,0.3)
def test_nice_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time, 0.6)
def test_user_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) user_time = cpu_util.user_time() self.assertEqual(user_time,0.15)
def test_nice_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time,0.3)
def test_guest_nice(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) guest_nice = cpu_util.guest_nice() self.assertEqual(guest_nice,0.52)
def test_idle_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time,0.22)
def test_irq_soft(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) irq_soft = cpu_util.irq_soft() self.assertEqual(irq_soft,0.15)
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)
def test_nice_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time,0.6)
def test_guest_time_if_current_value_is_none(self): cpu_util = CoreCpuUtil(2, 1.34, self.__metric_repository) guest_time = cpu_util.guest_time() self.assertIsNone(guest_time)
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)
def test_guest_nice_if_previous_value_is_none(self): cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository) guest_nice = cpu_util.guest_nice() self.assertIsNone(guest_nice)
def test_irq_soft_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) irq_soft = cpu_util.irq_soft() self.assertEqual(irq_soft,0.07)
def test_user_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) user_time = cpu_util.user_time() self.assertEqual(user_time, 0.3)
def test_guest_nice_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) guest_nice = cpu_util.guest_nice() self.assertEqual(guest_nice,0.26)
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)
def test_idle_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time,0.11)
def test_guest_nice(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) guest_nice = cpu_util.guest_nice() self.assertEqual(guest_nice, 0.52)
def test_irq_hard_if_current_value_is_none(self): cpu_util = CoreCpuUtil(2, 1.34, self.__metric_repository) irq_hard = cpu_util.irq_hard() self.assertIsNone(irq_hard)
def test_user_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) user_time = cpu_util.user_time() self.assertEqual(user_time, 0.15)
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)
def test_irq_soft_if_previous_value_is_none(self): cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository) irq_soft = cpu_util.irq_soft() self.assertIsNone(irq_soft)
def test_guest_nice_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) guest_nice = cpu_util.guest_nice() self.assertEqual(guest_nice, 0.26)
def test_idle_time_if_previous_value_is_none(self): cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertIsNone(idle_time)
def test_cpu_online(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) test_cpu_online = cpu_util.cpu_online() self.assertEqual(test_cpu_online, 2)