]> granicus.if.org Git - procps-ng/commit
top: refactor graph support of cpu/mem summary display <=== port of newlib 2d5b51d1
authorJim Warner <james.warner@comcast.net>
Mon, 12 Sep 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 13 Sep 2022 10:08:22 +0000 (20:08 +1000)
commit737e6f5b594c07f4ab9d6b50df5ff80abf2863f2
treec790178ed9aa0818077d7e5cacd236b1d0a1fb4d
parentf1862cde1c7cfa80cc18855c168a40cba4c797f0
top: refactor graph support of cpu/mem summary display <=== port of newlib 2d5b51d1

______________________________ original newlib message

The logic (illogic?) in the sum_tics() and do_memory()
functions has grown to become almost unfathomable over
time. Additionally, though perhaps not apparent in the
code, many steps are duplicated within those routines.

So, this patch refactors all the summary graph support
to consolidate duplicated code and (hopefully) make it
more understandable with an eye to future maintenance.

[ additionally, that show_special guy's workload has ]
[ been reduced by eliminating any special directives ]
[ previously embedded in some cpu graphs even though ]
[ a cpu may have been idle during the last interval. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h