Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)
Example #5
0
    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)
Example #6
0
    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)