vlib: calculate per-worker loops/second metric
[vpp.git] / src / vlib / node_cli.c
index 32c6c1a..1ba0575 100644 (file)
@@ -442,11 +442,12 @@ show_node_runtime (vlib_main_t * vm,
          dt = time_now - nm->time_last_runtime_stats_clear;
          vlib_cli_output
            (vm,
-            "Time %.1f, %f sec internal node vector rate %.2f \n"
+            "Time %.1f, %f sec internal node vector rate %.2f loops/sec %.2f\n"
             "  vector rates in %.4e, out %.4e, drop %.4e, punt %.4e",
             dt,
             vlib_get_stat_segment_update_rate (),
             internal_node_vector_rates[j],
+            stat_vm->loops_per_second,
             (f64) n_input / dt,
             (f64) n_output / dt, (f64) n_drop / dt, (f64) n_punt / dt);
 
@@ -606,7 +607,7 @@ show_node (vlib_main_t * vm, unformat_input_t * input,
   if (n->sibling_of)
     s = format (s, ", sibling-of %s", n->sibling_of);
 
-  vlib_cli_output (vm, "node %s, type %s, state %U, index %d%v\n",
+  vlib_cli_output (vm, "node %v, type %s, state %U, index %d%v\n",
                   n->name, type_str, format_vlib_node_state, vm, n,
                   n->index, s);
   vec_reset_length (s);