[master] be429e5 Make the CHANGE column show negative numbers when gauges drop

Poul-Henning Kamp phk at FreeBSD.org
Wed Feb 5 20:14:24 CET 2014


commit be429e5e3b421d9a07be4bfa8025951841dea9c8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 5 19:13:59 2014 +0000

    Make the CHANGE column show negative numbers when gauges drop

diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 2b0137d..e722408 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -380,7 +380,7 @@ sample_points(void)
 		pt->t_cur = VTIM_mono();
 
 		if (pt->t_last)
-			pt->chg = (pt->cur - (intmax_t)pt->last) /
+			pt->chg = ((intmax_t)pt->cur - (intmax_t)pt->last) /
 			    (pt->t_cur - pt->t_last);
 
 		if (pt->flag == 'g') {



More information about the varnish-commit mailing list