diff options
author | 2021-02-25 22:51:35 +0200 | |
---|---|---|
committer | 2021-02-25 22:51:35 +0200 | |
commit | 7419a9ec6bb02a44f76785f0115e8996f0b589bb (patch) | |
tree | d69172c91b2e12ce27dc0dc48aa0f981baec40a9 /src/main.c | |
parent | 984e9216da19dead3fe2c4669c2163c82687dbf5 (diff) | |
download | algos-ld1-7419a9ec6bb02a44f76785f0115e8996f0b589bb.tar.gz algos-ld1-7419a9ec6bb02a44f76785f0115e8996f0b589bb.tar.bz2 algos-ld1-7419a9ec6bb02a44f76785f0115e8996f0b589bb.zip |
adjust benchmark output formatting.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); } |