summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-08-22 21:15:54 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-09-27 09:36:17 +0000
commit997f95e11a23c7d90a1d29464841a7ad6a413a6c (patch)
treeaf260a88f931912baf4dfd42e540b67b70853762 /src/plugins
parent244bc6764e7ea6c458f667771031a1d1712db74f (diff)
hsa: clean up vpp_echo json output
Type: style Change-Id: I8dbf2197b78690b94a346d6ff564648ab42f8235 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> (cherry picked from commit 374f706bff707b8a4bcf62cb1ff0c48d5a65b3bf)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo.c b/src/plugins/hs_apps/sapi/vpp_echo.c
index 612bdb98e78..18997599113 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo.c
@@ -128,21 +128,23 @@ print_global_json_stats (echo_main_t * em)
u8 *end_evt =
format (0, "%U", echo_format_timing_event, em->timing.end_event);
fformat (stdout, "{\n");
- fformat (stdout, "\"time\": \"%.9f\",\n", deltat);
- fformat (stdout, "\"start_evt\": \"%s\",\n", start_evt);
- fformat (stdout, "\"end_evt\": \"%s\",\n", end_evt);
- fformat (stdout, "\"rx_data\": %lld,\n", em->stats.rx_total);
- fformat (stdout, "\"tx_rx\": %lld,\n", em->stats.tx_total);
- fformat (stdout, "\"closing\": {\n");
- fformat (stdout, " \"reset\": { \"q\": %d, \"s\": %d },\n",
+ fformat (stdout, " \"role\": \"%s\",\n",
+ em->i_am_master ? "server" : "client");
+ fformat (stdout, " \"time\": \"%.9f\",\n", deltat);
+ fformat (stdout, " \"start_evt\": \"%s\",\n", start_evt);
+ fformat (stdout, " \"end_evt\": \"%s\",\n", end_evt);
+ fformat (stdout, " \"rx_data\": %lld,\n", em->stats.rx_total);
+ fformat (stdout, " \"tx_rx\": %lld,\n", em->stats.tx_total);
+ fformat (stdout, " \"closing\": {\n");
+ fformat (stdout, " \"reset\": { \"q\": %d, \"s\": %d },\n",
em->stats.reset_count.q, em->stats.reset_count.s);
- fformat (stdout, " \"close\": { \"q\": %d, \"s\": %d },\n",
+ fformat (stdout, " \"close\": { \"q\": %d, \"s\": %d },\n",
em->stats.close_count.q, em->stats.close_count.s);
- fformat (stdout, " \"active\": { \"q\": %d, \"s\": %d },\n",
+ fformat (stdout, " \"active\": { \"q\": %d, \"s\": %d },\n",
em->stats.active_count.q, em->stats.active_count.s);
- fformat (stdout, " \"clean\": { \"q\": %d, \"s\": %d }\n",
+ fformat (stdout, " \"clean\": { \"q\": %d, \"s\": %d }\n",
em->stats.clean_count.q, em->stats.clean_count.s);
- fformat (stdout, "}\n");
+ fformat (stdout, " }\n");
fformat (stdout, "}\n");
}