Re: pgbench logging broken by time logic changes
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Thomas Munro <thomas.munro@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
Gregory Smith <gregsmithpgsql@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
david.christensen@crunchydata.com
Date: 2021-06-23T09:37:58Z
Lists: pgsql-hackers
Attachments
- pgbench-log-fix-9.patch (text/x-diff) patch
Bonjour Michaël,
> Could it be possible to document the intention of the test and its
> coverage then? With the current patch, one has to guess what's the
> intention behind this case.
Ok, see attached.
>>> +check_pgbench_logs($bdir, '001_pgbench_log_1', $nthreads, 1, 3,
>>> + qr{^\d{10,} \d{1,2} \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+$});
>
> Hm.. Could it be possible to tighten a bit the regex used here then?
> I was playing with it and it is not really picky in terms of patterns
> allowed or rejected.
> The follow-up checks for check_pgbench_logs() could be a bit more
> restrictive as well, but my regex-fu is bad.
Given the probabilistic nature of a --rate run and the variability of
hosts which may run the tests, it is hard to be more specific that \d+ for
actual performance data. The run may try 0 or 50 transaction within a
second (both with pretty low probabilities), so the test mostly checks the
format and some basic sanity on the output and logs.
>>> I would say to give up on the first test, and keep the second.
>>
>> You mean remove the time check and keep the log check. I'd like to keep a
>> time check, or at least have it in comment so that I can enable it simply.
>
> I'd rather avoid tests that tend to fail on slow machines. There is a
> flotilla in the buildfarm.
Commented out in attached v9.
--
Fabien.
Commits
-
Fix pgbench timestamp bugs.
- 5614a0f78eaa 14.0 landed
- 0e39a608ed55 15.0 landed
-
Fix pattern matching logic for logs in TAP tests of pgbench
- 0efd2a1a66dd 11.13 landed
- 79ff96aa9d9a 12.8 landed
- 7a9eaf111ac0 13.4 landed
- c13585fe9e55 14.0 landed
-
pgbench: Improve time logic.
- 547f04e7348b 14.0 cited
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 cited
-
pgbench: refactor handling of stats tracking
- b60376649600 9.6.0 cited