Пример #1
0
    def test_irq_hard_if_previous_value_is_none(self):
        cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository)

        irq_hard = cpu_util.irq_hard()

        self.assertIsNone(irq_hard)
Пример #2
0
    def test_irq_hard_for_all_cpus(self):
        cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository)

        irq_hard = cpu_util.irq_hard()

        self.assertEqual(irq_hard, 0.07)
Пример #3
0
    def test_irq_hard(self):
        cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository)

        irq_hard = cpu_util.irq_hard()

        self.assertEqual(irq_hard, 0.15)
Пример #4
0
    def test_irq_hard_if_previous_value_is_none(self):
        cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository)

        irq_hard  = cpu_util.irq_hard()

        self.assertIsNone(irq_hard)
Пример #5
0
    def test_irq_hard_for_all_cpus(self):
        cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository)

        irq_hard  = cpu_util.irq_hard()

        self.assertEqual(irq_hard,0.07)
Пример #6
0
    def test_irq_hard(self):
        cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository)

        irq_hard  = cpu_util.irq_hard()

        self.assertEqual(irq_hard,0.15  )