Can we automatically add elapsed times to tap test log? - Mailing list pgsql-hackers

From Andres Freund
Subject Can we automatically add elapsed times to tap test log?
Date
Msg-id 20220401172150.rsycz4lrn7ewruil@alap3.anarazel.de
Whole thread Raw
Responses Re: Can we automatically add elapsed times to tap test log?  (Nathan Bossart <nathandbossart@gmail.com>)
Re: Can we automatically add elapsed times to tap test log?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

right now I am looking at a test added in the shmstats patch that's slow on
CI, on windows only. Unfortunately the regress_log_* output is useless as-is
to figure out where things hang.

I've hit this several times before. Of course it's not too hard to hack up
something printing elapsed time. But ISTM that it'd be better if we were able
to prefix the logging into regress_log_* with something like
[timestamp + time since start of test]
or
[timestamp + time since start of test + time since last log message]


This isn't just useful to figure out what parts of test are slow, but also
helps correlate server logs with the regress_log_* output. Which right now is
hard and inaccurate, requiring manually correlating statements between server
log and the tap test (often there's no logging for statements in the
regress_log_*).

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: GSoC: pgmoneta: Write-Ahead Log (WAL) infrastructure (2022)
Next
From: Robert Haas
Date:
Subject: PostgreSQL shutdown modes