From cfd726a23f07b8b4484ec58c91e79c15ca44fb18 Mon Sep 17 00:00:00 2001 From: Hailiang Wang Date: Tue, 3 Jan 2023 08:13:50 -0500 Subject: [PATCH] example/idxd_perf: Adjust the printing data spacing to make it beautiful Like this: IDXD_ChanID Core Transfers Bandwidth Failed Miscompares --------------------------------------------------------------------------- 0 0 7006937/s 13 MiB/s 35034688 0 =========================================================================== Total: 7006937/s 13 MiB/s 35034688 0 Change-Id: I18b0538268ba56d79b77ca6659dc260ee115675c Signed-off-by: Hailiang Wang Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16100 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki --- examples/idxd/perf/perf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/idxd/perf/perf.c b/examples/idxd/perf/perf.c index ee1db7799..5786593d4 100644 --- a/examples/idxd/perf/perf.c +++ b/examples/idxd/perf/perf.c @@ -687,7 +687,7 @@ dump_result(void) struct idxd_chan_entry *t; printf("\nIDXD_ChanID Core Transfers Bandwidth Failed Miscompares\n"); - printf("------------------------------------------------------------------------\n"); + printf("---------------------------------------------------------------------------\n"); while (worker != NULL) { t = worker->ctx; while (t) { @@ -700,7 +700,7 @@ dump_result(void) total_miscompared += t->injected_miscompares; if (xfer_per_sec) { - printf("%10d%5u%15" PRIu64 "/s%9" PRIu64 " MiB/s%7" PRIu64 " %11" PRIu64 "\n", + printf("%10d%5u%16" PRIu64 "/s%9" PRIu64 " MiB/s%11" PRIu64 " %15" PRIu64 "\n", t->idxd_chan_id, worker->core, xfer_per_sec, bw_in_MiBps, t->xfer_failed, t->injected_miscompares); } @@ -714,8 +714,8 @@ dump_result(void) total_bw_in_MiBps = (total_completed * g_xfer_size_bytes) / (g_time_in_sec * 1024 * 1024); - printf("=========================================================================\n"); - printf("Total:%25" PRIu64 "/s%9" PRIu64 " MiB/s%6" PRIu64 " %11" PRIu64"\n\n", + printf("===========================================================================\n"); + printf("Total:%25" PRIu64 "/s%9" PRIu64 " MiB/s%11" PRIu64 " %15" PRIu64"\n\n", total_xfer_per_sec, total_bw_in_MiBps, total_failed, total_miscompared); return total_failed ? 1 : 0;