mirror of https://github.com/aristocratos/bpytop
Fixed cpu usage bug when showing tree and memory in percent
parent
63058a1178
commit
f867c86fdb
|
@ -3087,7 +3087,7 @@ class ProcCollector(Collector):
|
||||||
infolist: Dict = {}
|
infolist: Dict = {}
|
||||||
tree = defaultdict(list)
|
tree = defaultdict(list)
|
||||||
n: int = 0
|
n: int = 0
|
||||||
for p in sorted(psutil.process_iter(cls.p_values + ["memory_info"] if CONFIG.proc_mem_bytes else [], err), key=lambda p: eval(sort_cmd), reverse=reverse):
|
for p in sorted(psutil.process_iter(cls.p_values + (["memory_info"] if CONFIG.proc_mem_bytes else []), err), key=lambda p: eval(sort_cmd), reverse=reverse):
|
||||||
if cls.collect_interrupt: return
|
if cls.collect_interrupt: return
|
||||||
try:
|
try:
|
||||||
tree[p.ppid()].append(p.pid)
|
tree[p.ppid()].append(p.pid)
|
||||||
|
|
Loading…
Reference in New Issue