stats: cosmetic: print 'stats interval' before the reporters
It's better to have the common parameters printed first.
Change-Id: Ifb401d4d363fb70e89960ca739baba5ee55eefe8
Related: SYS#5713
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index a4fc6ea..48e4f1c 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -680,12 +680,12 @@
{
struct osmo_stats_reporter *srep;
+ vty_out(vty, "stats interval %d%s", osmo_stats_config->interval, VTY_NEWLINE);
+
/* Loop through all reporters */
llist_for_each_entry(srep, &osmo_stats_reporter_list, list)
config_write_stats_reporter(vty, srep);
- vty_out(vty, "stats interval %d%s", osmo_stats_config->interval, VTY_NEWLINE);
-
return 1;
}
diff --git a/tests/stats/stats_vty_test.vty b/tests/stats/stats_vty_test.vty
index 017b188..7c01d3f 100644
--- a/tests/stats/stats_vty_test.vty
+++ b/tests/stats/stats_vty_test.vty
@@ -34,11 +34,11 @@
stats_vty_test(config-stats)# show running-config
...
+stats interval 5
stats reporter statsd
disable
level global
no prefix
-stats interval 5
...
stats_vty_test(config-stats)# level subscriber