pcp
[Top] [All Lists]

[PATCH] Improve pmatop value fitting

To: PCP <pcp@xxxxxxxxxxx>
Subject: [PATCH] Improve pmatop value fitting
From: Stan Cox <scox@xxxxxxxxxx>
Date: Mon, 09 Jun 2014 17:15:33 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
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.

<Prev in Thread] Current Thread [Next in Thread>