aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-08-22 21:15:54 +0000
committerDave Wallace <dwallacelf@gmail.com>2019-08-28 21:19:39 +0000
commit374f706bff707b8a4bcf62cb1ff0c48d5a65b3bf (patch)
tree0ab98b39dd156a8d82ff69dd854dede9d3841dfb /src/plugins/hs_apps
parentf3a8c0803376bcc05db3b80ed97039d1df601b63 (diff)
hsa: clean up vpp_echo json output
Type: style Change-Id: I8dbf2197b78690b94a346d6ff564648ab42f8235 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps')
-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");
}