Esempio n. 1
0
 def test_cgroup_utilities(self):
     """
     Test utilities for querying cgroup metadata
     """
     cpu_id = CGroups.get_hierarchy_id('cpu')
     self.assertGreater(int(cpu_id), 0)
     memory_id = CGroups.get_hierarchy_id('memory')
     self.assertGreater(int(memory_id), 0)
     self.assertNotEqual(cpu_id, memory_id)
Esempio n. 2
0
 def test_cgroup_utilities(self):
     """
     Test utilities for querying cgroup metadata
     """
     cpu_id = CGroups.get_hierarchy_id('cpu')
     self.assertGreater(int(cpu_id), 0)
     memory_id = CGroups.get_hierarchy_id('memory')
     self.assertGreater(int(memory_id), 0)
     self.assertNotEqual(cpu_id, memory_id)
Esempio n. 3
0
 def path_maker(hierarchy, __):
     suffix = CGroups.get_my_cgroup_path(CGroups.get_hierarchy_id('cpu'))
     return os.path.join(BASE_CGROUPS, hierarchy, suffix)
Esempio n. 4
0
 def path_maker(hierarchy, __):
     suffix = CGroups.get_my_cgroup_path(CGroups.get_hierarchy_id('cpu'))
     return os.path.join(BASE_CGROUPS, hierarchy, suffix)