Re: What is a typical precision of gettimeofday()? - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: What is a typical precision of gettimeofday()?
Date
Msg-id CAMT0RQQXzkL=QREKtu1esiNbD5k0ULJF9Jb2fgBuYOJSwegpPA@mail.gmail.com
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: What is a typical precision of gettimeofday()?
List pgsql-hackers
On Tue, Jul 2, 2024 at 7:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>

> > Do we also need tests for this one ?
>
> Yeah, it was annoying me that we are eating the overhead of a TAP test
> for pg_test_timing and yet it covers barely a third of the code [1].
> We obviously can't expect any specific numbers out of a test, but I
> was contemplating running "pg_test_timing -d 1" and just checking for
> (a) zero exit code and (b) the expected header lines in the output.

At least "does it run" tests should be there -

For example with the current toolchain on MacOS I was able to compile
__builtin_readcyclecounter(); but it crashed when the result was
executed.

The same code compiled *and run* fine on same laptop with Ubuntu 24.04

We might also want to have some testing about available speedups from
pg_bitmanip.h being used, but that could be tricky to test in an
universal way.

--
Hannu



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: An improved README experience for PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: What is a typical precision of gettimeofday()?