def get_memory_table_info(self) -> MemoryTable: # Collecting memory info adds big overhead to the cluster. # This must be collected only when it is necessary. self.raylet_stats.include_memory_info = True D = self.raylet_stats.get_raylet_stats() workers_info_by_node = { data["nodeId"]: data.get("workersStats") for data in D.values() } self.memory_table = construct_memory_table(workers_info_by_node) return self.memory_table
def get_memory_table_info(self, group_by=GroupByType.NODE_ADDRESS, sort_by=SortingType.OBJECT_SIZE) -> MemoryTable: # Collecting memory info adds big overhead to the cluster. # This must be collected only when it is necessary. self.raylet_stats.include_memory_info = True D = self.raylet_stats.get_raylet_stats() workers_info_by_node = { data["nodeId"]: data.get("workersStats") for data in D.values() } self.memory_table = construct_memory_table( workers_info_by_node, group_by=group_by, sort_by=sort_by) return self.memory_table