]> Savannah Git Hosting - gnulib.git/commit
timevar: improve the output format
authorAkim Demaille <akim.demaille@gmail.com>
Thu, 11 Oct 2018 20:15:36 +0000 (22:15 +0200)
committerAkim Demaille <akim.demaille@gmail.com>
Sat, 13 Oct 2018 04:49:23 +0000 (06:49 +0200)
commit5ac17e36cff1e439da8c55e854eba2dc6fc8d2cc
tree2c96f443f67529f93c5884703b9e3dfcd1351a07
parentda905beac4579a2e3292bbdf4592a513d12a2e80
timevar: improve the output format

From:

    Execution times (seconds)
     reader                :   0,01 ( 3%) usr   0,00 (16%) sys   0,00 ( 0%) wall
     outputting report     :   0,03 ( 6%) usr   0,00 (15%) sys   0,00 ( 0%) wall
     parser action tables  :   0,02 ( 4%) usr   0,00 ( 2%) sys   0,00 ( 0%) wall
     outputting parser     :   0,01 ( 2%) usr   0,00 (13%) sys   0,00 ( 0%) wall
     running m4            :   0,37 (84%) usr   0,00 (50%) sys   0,00 ( 0%) wall
     total time            :   0,44             0,01             0,00

To:

    Execution times (seconds)
                              CPU user      CPU system    wall clock
     reader                   0,020 ( 4%)   0,002 ( 9%)   0,000000 ( 0%)
     outputting report        0,029 ( 6%)   0,002 (11%)   0,000000 ( 0%)
     parser action tables     0,020 ( 4%)   0,001 ( 6%)   0,000000 ( 0%)
     outputting parser        0,014 ( 3%)   0,002 (10%)   0,000000 ( 0%)
     running m4               0,431 (83%)   0,012 (59%)   0,000000 ( 0%)
     total time               0,522         0,020         0,000000

Suggested by Bruno Haible.
See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00040.html.

* lib/timevar.c (timevar_print): Use %7.3f for usr/sys and %11.6f for
wall, since its resolution is much higher.
ChangeLog
lib/timevar.c