public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Hannu Krosing <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Andrey M. Borodin <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: What is a typical precision of gettimeofday()?
Date: Tue, 02 Jul 2024 13:50:13 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMT0RQTzzzSfO4j3PeF5riQ_mER_9BE_LNnjEUrM349ZhhDbww@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAMT0RQSdKQra6QC4b+eAynpqZ0SYdHDfGBBE7hty33OD9jx7Jg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAMT0RQTzzzSfO4j3PeF5riQ_mER_9BE_LNnjEUrM349ZhhDbww@mail.gmail.com>

Hannu Krosing <[email protected]> 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






view thread (17+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: What is a typical precision of gettimeofday()?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox