• Iustin Pop's avatar
    htools: add human-readable output to hspace · 375969eb
    Iustin Pop authored
    Currently, hspace can only output a machine-readable format that
    (while detailed) is hard to parse quickly by people. This patch adds
    (and enables by default) a human-readable output that shows the most
    important metrics in a simple format.
    
    Most of the work of the patch is in moving the display of various
    metrics from the 'main' function to separate functions, each of which
    can output either a machine or human intended format.
    
    The patch also corrects a bug in the CPU efficiency display: before,
    the efficiency was computed as instance virtual CPUs divided by total
    physical CPUs, which is almost always supra-unitary. More correct is
    to divide by the total virtual CPUs, which shows a more meaningful
    number (when the p-to-v CPU ratio has been defined correctly).
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    375969eb
hspace.rst 13.9 KB