Despite the size of the patch it is conceptually simple. The atop
command by and large does not depend on anything but simple use of
printf formatting. Instead it rolls its own so it can more predictably
do tight fitting of values into a maximum sized field. This patch does
something similar. It adds a routine valstr that fits values for
situations like:
7.37682e+06, length 7, = 7376820
7.37682e+06, length 5, = 738e4
3.66211e-05, length 7, = 3.66e-5
It also adds memstr which does something similar, but specifically for
memory units:
1.23457e+08, length 4 = 117M
Then it changes every use of put_value to use one of the above.
git://sourceware.org/git/pcpfans.git
scox/dev 55de60ddb953a42f55f27212bf4c66f6f50ae269
Stan Cox (1): Improve pmatop value fitting.
|