From 7419a9ec6bb02a44f76785f0115e8996f0b589bb Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Thu, 25 Feb 2021 22:51:35 +0200 Subject: adjust benchmark output formatting. Signed-off-by: Gediminas Jakutis --- src/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 9d66594..381040a 100644 --- a/src/main.c +++ b/src/main.c @@ -44,7 +44,6 @@ int main(int argc, char **argv) rin_diag_init(); rin_diag_format(rin_diag_info, "C:mn"); - rin_diag_channel_set_enabled_state(rin_diag_err, 0); file_in.type = stream_in; file_out.type = stream_out; @@ -90,10 +89,10 @@ int main(int argc, char **argv) try_s((ret = merge_sort(&file_in, &file_tmp)), out); rin_bench_stop(&bongholio); /* BENCHMARK ENDS HERE */ - rin_info("wall: %lus%6luµs", bongholio.wall.tv_sec, bongholio.wall.tv_nsec / 1000); - rin_info("system: %lus%6luµs", bongholio.system.tv_sec, bongholio.system.tv_usec); - rin_info("user: %lus%6luµs", bongholio.user.tv_sec, bongholio.user.tv_usec); - rin_info("total: %lus%6luµs", bongholio.total.tv_sec, bongholio.total.tv_usec); + rin_info("wall: %lus %3lums %3luµs", bongholio.wall.tv_sec, bongholio.wall.tv_nsec / (1000 * 1000), (bongholio.wall.tv_nsec / 1000) % 1000); + rin_info("system: %lus %3lums %3luµs", bongholio.system.tv_sec, bongholio.system.tv_usec / 1000, bongholio.system.tv_usec % 1000); + rin_info("user: %lus %3lums %3luµs", bongholio.user.tv_sec, bongholio.user.tv_usec / 1000, bongholio.user.tv_usec % 1000); + rin_info("total: %lus %3lums %3luµs", bongholio.total.tv_sec, bongholio.total.tv_usec / 1000, bongholio.total.tv_usec % 1000); try_s((ret = cache_transfer(&file_tmp, &file_out)), out); } -- cgit v1.2.3