(root_pids: list[int], pgids: list[int])
| 318 | |
| 319 | |
| 320 | def sum_tree_pss(root_pids: list[int], pgids: list[int]) -> tuple[float, int]: |
| 321 | all_pids = collect_descendants(root_pids) | collect_process_group_pids(pgids) |
| 322 | total = 0.0 |
| 323 | counted = 0 |
| 324 | for pid in sorted(all_pids): |
| 325 | pss = read_pss_mb(pid) |
| 326 | if pss is None: |
| 327 | continue |
| 328 | total += pss |
| 329 | counted += 1 |
| 330 | return round(total, 1), counted |
| 331 | |
| 332 | |
| 333 | def terminate_pgroup(pgid: int) -> None: |
no test coverage detected