• Dag Erling Smørgrav's avatar
    Some of the statistics we gather are accumulated totals, while others are · 63a05fef
    Dag Erling Smørgrav authored
    instantaneous measurements.  For instance, we report the total number of
    allocator requests made over the child's lifetime, but we also report the
    amount of storage in use at any particular moment.
    
    The difference is important, because accumulated totals can be averaged
    over the program's lifetime (or over the last N seconds), but instantaneous
    measurements can't.
    
    Recycle the format field in MAC_STAT() (it was never used anyway) into a
    single-character flag indicating whether each item is an accumulated total
    ('a') or an instantaneous measure ('i').  Use this in varnishstat to skip
    averaging non-averageable numbers.
    
    Also rework varnishstat's "once" mode to show 1) each statistic's symbolic
    name, 2) its current value, 3) if appropriate, its value averaged over the
    process lifetime, and 4) its description.
    
    The reason for displaying the symbolic name is to simplify scripting, and
    to serve as a reference for looking up symbolic names to pass to e.g. the
    upcoming Nagios plugin.
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1587 d4fa192b-c00b-0410-8231-f00ffab90ce4
    63a05fef
stat_field.h 4.32 KB