Пример #1
0
    def test_maj_flt(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        maj_flt = process_memory_usage.majflt()

        self.assertEquals(maj_flt, 2.99)
Пример #2
0
    def test_maj_flt_if_previous_value_is_None(self):
        process_memory_usage = ProcessMemoryUtil(2, 1.34,
                                                 self.__metric_repository)

        maj_flt = process_memory_usage.majflt()

        self.assertIsNone(maj_flt)
    def test_maj_flt(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)
        test_maj_flt = float("%.2f"%(((647 + 54) - (645 + 50))/1.34))

        maj_flt = process_memory_usage.majflt()

        self.assertEquals(maj_flt, test_maj_flt)
    def test_maj_flt_if_previous_value_is_None(self):
        process_memory_usage = ProcessMemoryUtil(2,1.34,self.__metric_repository)

        maj_flt = process_memory_usage.majflt()

        self.assertIsNone(maj_flt)
    def test_maj_flt(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        maj_flt = process_memory_usage.majflt()

        self.assertEquals(maj_flt, 2.99)