[master] 0f5f457c8 varnishstat: New -r option

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 11 17:06:07 UTC 2021


commit 0f5f457c8a01066b62773ed1687886f6371aa31d
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Dec 8 18:41:27 2020 +0100

    varnishstat: New -r option

diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index 695ca092c..34c073947 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -315,6 +315,9 @@ main(int argc, char * const *argv)
 			AN(VSC_Arg(vsc, opt, optarg));
 			has_f = 1;
 			break;
+		case 'r':
+			AN(VSC_Arg(vsc, opt, optarg));
+			break;
 		case 'V':
 			AN(VUT_Arg(vut, opt, optarg));
 			break;
diff --git a/bin/varnishstat/varnishstat_options.h b/bin/varnishstat/varnishstat_options.h
index b98ba11c0..945bde425 100644
--- a/bin/varnishstat/varnishstat_options.h
+++ b/bin/varnishstat/varnishstat_options.h
@@ -47,6 +47,10 @@
 	    "Lists the available fields to use with the -f option",	\
 	    "Lists the available fields to use with the -f option."	\
 	)
+#define STAT_OPT_r							\
+	VOPT("r", "[-r]", "Toggle raw or adjusted gauges",		\
+	    "Toggle raw or adjusted gauges, adjusted is the default."	\
+	)
 #define STAT_OPT_x							\
 	VOPT("x", "[-x]", "Print statistics to stdout as XML",		\
 	    "Print statistics to stdout as XML."			\
@@ -59,6 +63,7 @@ VSC_OPT_I
 STAT_OPT_j
 STAT_OPT_l
 VUT_OPT_n
+STAT_OPT_r
 VUT_OPT_t
 VUT_GLOBAL_OPT_V
 VSC_OPT_X


More information about the varnish-commit mailing list