Re: Reporting script runtimes in pg_regress

From: Christoph Berg <myon(at)debian(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Reporting script runtimes in pg_regress
Date: 2019-02-21 09:37:02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Re: Tom Lane 2019-02-18 <28360(dot)1550506699(at)sss(dot)pgh(dot)pa(dot)us>
> >>> We should also strive to align "FAILED" properly.
> >> Yeah, not strictly required, but someone might want to play around with
> >> it a bit.
> > FWIW I don't think we localize pg_regress output currently, so that
> > argument seems moot ... But I think we can get away with constant four
> > spaces for now.
> I pushed Peter's suggestion for %8.0f; let's live with that for a little
> and see if it's still annoying.

The ryu changes make postgresql-unit fail quite loudly:

$ cat regression.out
test extension ... ok 359 ms
test tables ... FAILED 164 ms
test unit ... FAILED 867 ms
test binary ... ok 20 ms
test unicode ... ok 18 ms
test prefix ... FAILED 43 ms
test units ... FAILED 207 ms
test time ... FAILED 99 ms
test temperature ... FAILED 22 ms

The misalignment annoyed me enough (especially the false alignment
between "ms" on the first row and "164" on the next row) to look into
it. Aligned it looks like this:

test extension ... ok 399 ms
test tables ... FAILED 190 ms
test unit ... FAILED 569 ms
test binary ... ok 14 ms
test unicode ... ok 15 ms
test prefix ... FAILED 44 ms
test units ... FAILED 208 ms
test time ... FAILED 99 ms
test temperature ... FAILED 21 ms

It doesn't break translations because it prints the extra spaces

In run_single_test() (which this output is from), it simply aligns the
output with FAILED. In run_schedule(), there is the 3rd output string
"failed (ignored)" which is considerably longer. I aligned the output
with that, but also made the timestamp field shorter so it's not too
much to the right.


Attachment Content-Type Size
0001-Align-timestamps-in-pg_regress-output.patch text/x-diff 1.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2019-02-21 10:49:29 Re: [patch] Add schema total size to psql \dn+
Previous Message Nariman Ibadullaev 2019-02-21 09:30:26 Solaris 10 (sparc) and unixODBC problem