From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change pg_test_timing to measure in nanoseconds not microseconds
Date: Tue, 08 Jul 2025 15:23:24 +0000
Message-ID: <E1uZAAF-005HQr-2o@gemulon.postgresql.org> (raw)
Change pg_test_timing to measure in nanoseconds not microseconds.
Most of our platforms have better-than-microsecond timing resolution,
so the original definition of this program is getting less and less
useful. Make it report nanoseconds not microseconds. Also, add a
second output table that reports the exact observed timing durations,
up to a limit of 1024 ns; and be sure to report the largest observed
duration.
The documentation for this program included a lot of system-specific
details that now seem largely obsolete. Move all that text to the
PG wiki, where perhaps it will be easier to maintain and update.
Also, improve the TAP test so that it actually runs a short standard
run, allowing most of the code to be exercised; its coverage before
was abysmal.
Author: Hannu Krosing <hannuk@google.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/be0339cc-1ae1-4892-9445-8e6d8995a44d@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0b096e379e6f9bd49d38020d880a7da337e570ad
Modified Files
--------------
doc/src/sgml/ref/pgtesttiming.sgml | 279 +++++++++++---------------------
src/bin/pg_test_timing/pg_test_timing.c | 172 ++++++++++++++++----
src/bin/pg_test_timing/t/001_basic.pl | 17 ++
3 files changed, 251 insertions(+), 217 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Change pg_test_timing to measure in nanoseconds not microseconds
In-Reply-To: <E1uZAAF-005HQr-2o@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox