Re: Reporting script runtimes in pg_regress
Christoph Berg <myon@debian.org>
From: Christoph Berg <myon@debian.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Daniel Gustafsson <daniel@yesql.se>, pgsql-hackers@lists.postgresql.org
Date: 2019-02-21T09:37:02Z
Lists: pgsql-hackers
Attachments
- 0001-Align-timestamps-in-pg_regress-output.patch (text/x-diff)
Re: Tom Lane 2019-02-18 <28360.1550506699@sss.pgh.pa.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 separately. 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. Christoph
Commits
-
Align timestamps in pg_regress output
- 148cf5f462e5 12.0 landed
-
De-clutter display of script runtimes in pg_regress.
- 93b5cc039e23 12.0 landed
-
Add per-test-script runtime display to pg_regress.
- 72d71e03563b 12.0 landed