mharsch / arcstat

uses Perl to extract, format, and display kstats from the ZFS ARC
67 stars 31 forks source link

pretty print numbers are not accurate enough #1

Closed mharsch closed 13 years ago

mharsch commented 14 years ago

The precision of values is directly related to their scale. For example, values between 1000 bytes/sec and 2000 bytes/sec are displayed as "1K." Similarly, values between 1000MB and 2000MB are displayed as "1G". It would be nice to have more precise values such as "1.7G" especially for large values (in the Gigabyte and Terabyte range).

This change will require replacement of the "prettynum" routine with a more sophisticated number formatting algorithm.

mharsch commented 13 years ago

Fixed in 0.3