From: phk Date: Thu, 20 Jul 2006 10:10:24 +0000 (+0000) Subject: Show also average since start X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f78885b7e552efb9404ecf3cae03a3e73eb09455;p=varnish Show also average since start git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@516 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishstat/varnishstat.c b/varnish-cache/bin/varnishstat/varnishstat.c index 38e678ab..06119c5f 100644 --- a/varnish-cache/bin/varnishstat/varnishstat.c +++ b/varnish-cache/bin/varnishstat/varnishstat.c @@ -30,7 +30,7 @@ do_curses(struct varnish_stats *VSL_stats) struct varnish_stats copy; intmax_t ju; struct timespec ts; - double tt, lt, hit, miss, ratio; + double tt, lt, hit, miss, ratio, up; double a1, a2, a3; unsigned n1, n2, n3; time_t rt; @@ -52,6 +52,7 @@ do_curses(struct varnish_stats *VSL_stats) lt = tt - lt; rt = ts.tv_sec - VSL_stats->start_time; + up = rt; move(0,0); i = 0; @@ -83,7 +84,8 @@ do_curses(struct varnish_stats *VSL_stats) #define MAC_STAT(n,t,f,d) \ ju = VSL_stats->n; \ - printw("%12ju %10.2f " d "\n", ju, (ju - (intmax_t)copy.n)/lt); \ + printw("%12ju %10.2f %10.2f " d "\n", \ + ju, (ju - (intmax_t)copy.n)/lt, ju / up); \ copy.n = ju; #include "stat_field.h" #undef MAC_STAT