Re: Reporting script runtimes in pg_regress

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, pgsql-hackers@lists.postgresql.org
Date: 2019-02-15T14:54:44Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2019-02-15 14:32, Peter Eisentraut wrote:
>> test event_trigger                ... ok      128 ms
>> test fast_default                 ... ok      173 ms
>> test stats                        ... ok      637 ms

That looks reasonable, although on machines where test runtimes run
into the tens of seconds, there's not going to be nearly as much
whitespace as this example suggests.

> We should also strive to align "FAILED" properly.

Hmm.  The reasonable ways to accomplish that look to be either
(a) pad "ok" to the width of "FAILED", or (b) rely on emitting a tab.
I don't much like either, especially from the localization angle.
One should also note that FAILED often comes along with additional
verbiage, such as "(ignored)" or a note about process exit status;
so I think making such cases line up totally neatly is a lost cause
anyway.

How do you feel about letting it do this:

      int4                         ... ok      128 ms
      int8                         ... FAILED      153 ms
      oid                          ... ok      163 ms
      float4                       ... ok      231 ms

			regards, tom lane


Commits

  1. Align timestamps in pg_regress output

  2. De-clutter display of script runtimes in pg_regress.

  3. Add per-test-script runtime display to pg_regress.