]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Allow more space in thread.c output
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 26 Sep 2016 18:06:23 +0000 (14:06 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 26 Sep 2016 18:06:23 +0000 (14:06 -0400)
When displaying thread time for long running/busy
protocols, the space allocated may not be sufficient.

Allow the runtime to take a bit more space.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/thread.c

index a26eb6bfd21dd0fe6879524e8dda8f11610ed016..26be17585efe29cf7e8af6682a07439fdcdc5545 100644 (file)
@@ -222,12 +222,12 @@ vty_out_cpu_thread_history(struct vty* vty,
                           struct cpu_thread_history *a)
 {
 #ifdef HAVE_RUSAGE
-  vty_out(vty, "%7ld.%03ld %9d %8ld %9ld %8ld %9ld",
+  vty_out(vty, "%10ld.%03ld %9d %8ld %9ld %8ld %9ld",
          a->cpu.total/1000, a->cpu.total%1000, a->total_calls,
          a->cpu.total/a->total_calls, a->cpu.max,
          a->real.total/a->total_calls, a->real.max);
 #else
-  vty_out(vty, "%7ld.%03ld %9d %8ld %9ld",
+  vty_out(vty, "%10ld.%03ld %9d %8ld %9ld",
          a->real.total/1000, a->real.total%1000, a->total_calls,
          a->real.total/a->total_calls, a->real.max);
 #endif
@@ -278,7 +278,7 @@ cpu_record_print(struct vty *vty, thread_type filter)
   vty_out(vty, "%21s %18s %18s%s",
          "", "CPU (user+system):", "Real (wall-clock):", VTY_NEWLINE);
 #endif
-  vty_out(vty, "Runtime(ms)   Invoked Avg uSec Max uSecs");
+  vty_out(vty, "   Runtime(ms)   Invoked Avg uSec Max uSecs");
 #ifdef HAVE_RUSAGE
   vty_out(vty, " Avg uSec Max uSecs");
 #endif