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

From Tom Lane
Subject Re: What is a typical precision of gettimeofday()?
Date
Msg-id 3115672.1719942613@sss.pgh.pa.us
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  (Hannu Krosing <hannuk@google.com>)
Responses Re: What is a typical precision of gettimeofday()?
List pgsql-hackers
Hannu Krosing <hannuk@google.com> writes:
> Also, reading directly in ticks on M1 gave "loop time including
> overhead: 2.13 ns" (attached code works on Clang, not sure about GCC)

I don't think we should mess with that, given the portability
problems you mentioned upthread.

> I'll also take a look at the docs and try to propose something

OK.

> 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.

            regards, tom lane

[1] https://coverage.postgresql.org/src/bin/pg_test_timing/pg_test_timing.c.gcov.html



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: On disable_cost
Next
From: Robert Haas
Date:
Subject: Re: On disable_cost