misc: add "show run summary"
Prints the interior node vector rate, rx / tx / drop rates
Type: feature
@@ -335,6 +335,7 @@ show_node_runtime (vlib_main_t * vm,
u64 n_internal_vectors, n_internal_calls;
u64 n_clocks, l, v, c, d;
int brief = 1;
+ int summary = 0;
int max = 0;
vlib_main_t **stat_vms = 0, *stat_vm;
@@ -345,6 +346,9 @@ show_node_runtime (vlib_main_t * vm,
brief = 0;
if (unformat (input, "max") || unformat (input, "m"))
max = 1;
+ if (unformat (input, "summary") || unformat (input, "sum")
+ || unformat (input, "su"))
+ summary = 1;
for (i = 0; i < vec_len (vlib_mains); i++)
{
@@ -446,7 +450,10 @@ show_node_runtime (vlib_main_t * vm,
(f64) n_input / dt,
(f64) n_output / dt, (f64) n_drop / dt, (f64) n_punt / dt);
- vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm, 0, max);
+ if (summary == 0)
+ {
+ vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm,
+ 0, max);
for (i = 0; i < vec_len (nodes); i++)
{
c =
@@ -457,8 +464,9 @@ show_node_runtime (vlib_main_t * vm,
nodes[i]->stats_last_clear.suspends;
if (c || d || !brief)
{
- vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm,
- nodes[i], max);
+ vlib_cli_output (vm, "%U", format_vlib_node_stats,
+ stat_vm, nodes[i], max);
+ }
}
}
vec_free (nodes);
