Make getrusage() output a little more readable

Started by Peter Eisentrautover 9 years ago3 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

The getrusage() output that is shown by VACUUM VERBOSE and other places
has always been a little too terse and confusing for me. I propose to
improve that a bit:

-CPU 0.01s/0.08u sec elapsed 0.18 sec.
+CPU: user: 0.08s, system: 0.01s, elapsed: 0.18s.

Patch attached.

I have also updated the ShowUsage() output used by log_parser_stats etc.
to match this change, but I don't claim that that output is particularly
readable either way.

While updating the VACUUM man page I noticed that the example output
doesn't match exactly anymore, but I didn't do anything about that in
this patch, just changed the lines that are affected by this patch.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

0001-Make-getrusage-output-a-little-more-readable.patchtext/x-patch; name=0001-Make-getrusage-output-a-little-more-readable.patchDownload+14-15
#2Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#1)
Re: Make getrusage() output a little more readable

On Fri, Oct 14, 2016 at 10:06 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

The getrusage() output that is shown by VACUUM VERBOSE and other places
has always been a little too terse and confusing for me. I propose to
improve that a bit:

-CPU 0.01s/0.08u sec elapsed 0.18 sec.
+CPU: user: 0.08s, system: 0.01s, elapsed: 0.18s.

Patch attached.

I have also updated the ShowUsage() output used by log_parser_stats etc.
to match this change, but I don't claim that that output is particularly
readable either way.

While updating the VACUUM man page I noticed that the example output
doesn't match exactly anymore, but I didn't do anything about that in
this patch, just changed the lines that are affected by this patch.

+1 for this change.

I have reviewed the patch and it seems fine.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

In reply to: Peter Eisentraut (#1)
Re: Make getrusage() output a little more readable

On Fri, Oct 14, 2016 at 7:06 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

The getrusage() output that is shown by VACUUM VERBOSE and other places
has always been a little too terse and confusing for me. I propose to
improve that a bit:

-CPU 0.01s/0.08u sec elapsed 0.18 sec.
+CPU: user: 0.08s, system: 0.01s, elapsed: 0.18s.

I look at trace_sort output a lot, and do agree that this is confusing. +1.

--
Peter Geoghegan

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers