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)
Esempio n. 2
0
    def test_vsize(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        vsize = process_memory_usage.vsize()

        self.assertEquals(vsize, 120084)
    def test_mem(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)
        test_mem = float("%.2f"%(100*float(6272)/3794764))

        mem = process_memory_usage.mem()

        self.assertEquals(mem, test_mem)
Esempio n. 4
0
    def test_min_flt(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        min_flt = process_memory_usage.minflt()

        self.assertEquals(min_flt, 6.72)
    def test_min_flt(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)
        test_min_flt = float("%.2f"%(((573935 + 14509) - (573930 + 14500))/1.34))

        min_flt = process_memory_usage.minflt()

        self.assertEquals(min_flt, test_min_flt)
Esempio n. 6
0
    def test_rss(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        rss = process_memory_usage.rss()

        self.assertEquals(rss, 6272)
Esempio n. 7
0
    def test_process_name(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        name = process_memory_usage.process_name()

        self.assertEqual(name, 'test')
Esempio n. 8
0
    def test_user_id(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        user_id = process_memory_usage.user_id()

        self.assertEqual(user_id, 1)
Esempio n. 9
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)
Esempio n. 10
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)
Esempio n. 11
0
    def test_min_flt_if_current_value_is_None(self):
        process_memory_usage = ProcessMemoryUtil(3, 1.34,
                                                 self.__metric_repository)

        min_flt = process_memory_usage.minflt()

        self.assertIsNone(min_flt)
Esempio n. 12
0
    def test_mem(self):
        process_memory_usage = ProcessMemoryUtil(1, 1.34,
                                                 self.__metric_repository)

        mem = process_memory_usage.mem()

        self.assertEquals(mem, 0.17)
    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)
    def test_min_flt(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        min_flt = process_memory_usage.minflt()

        self.assertEquals(min_flt, 6.72)
    def test_mem(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        mem = process_memory_usage.mem()

        self.assertEquals(mem, 0.17)
    def test_rss(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        rss = process_memory_usage.rss()

        self.assertEquals(rss, 6272)
    def test_vsize(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        vsize = process_memory_usage.vsize()

        self.assertEquals(vsize, 120084)
    def test_pid(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        pid = process_memory_usage.pid()

        self.assertEqual(pid,1)
    def test_process_name(self):
        process_memory_usage = ProcessMemoryUtil(1,1.34,self.__metric_repository)

        name = process_memory_usage.process_name()

        self.assertEqual(name,'test')
Esempio n. 21
0
    def test_min_flt_if_current_value_is_None(self):
        process_memory_usage = ProcessMemoryUtil(3,1.34,self.__metric_repository)

        min_flt = process_memory_usage.minflt()

        self.assertIsNone(min_flt)