agora inbox for [email protected]  
help / color / mirror / Atom feed
Changing Column Order (Was Re: MySQL vs PostgreSQL.)
277+ messages / 11 participants
[nested] [flat]

* Changing Column Order (Was Re: MySQL vs PostgreSQL.)
@ 2002-10-12 08:37 Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
  2002-10-12 09:54 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Jeff Davis <[email protected]>
  2002-10-12 10:50 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Shridhar Daithankar <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  0 siblings, 4 replies; 277+ messages in thread

From: Gavin Sherry @ 2002-10-12 08:37 UTC (permalink / raw)
  To: Hannu Krosing <[email protected]>; +Cc: pgsql-hackers

On 12 Oct 2002, Hannu Krosing wrote:

> Alvaro Herrera kirjutas L, 12.10.2002 kell 04:16:
> > On Fri, Oct 11, 2002 at 07:08:18PM -0700, Jeff Davis wrote:
> > 
> > > And it really is a minor matter of convenience. I end up dropping and 
> > > recreating all my tables a lot in the early stages of development, which is 
> > > mildly annoying. Certainly not as bad, I suppose, as if you're led to believe 
> > > that a feature does something safely, and it kills all your data.
> > 
> > Now that ALTER TABLE DROP COLUMN is implemented, there probably isn't
> > any more the need to do such frequent drop/create of tables.
> 
> Did attlognum's (for changing column order) get implemented for 7.2 ?

I cannot think of any reason why changing column order should be
implemented in Postgres. Seems like a waste of time/more code bloat for
something which is strictly asthetic.

Regardless, I do have collegues/clients who ask when such a feature will
be implemented. Why is this useful?

Gavin




^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
@ 2002-10-12 09:43 ` Antti Haapala <[email protected]>
  2002-10-12 15:45   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruno Wolff III <[email protected]>
  3 siblings, 1 reply; 277+ messages in thread

From: Antti Haapala @ 2002-10-12 09:43 UTC (permalink / raw)
  To: Gavin Sherry <[email protected]>; +Cc: Hannu Krosing <[email protected]>; pgsql-hackers


> I cannot think of any reason why changing column order should be
> implemented in Postgres. Seems like a waste of time/more code bloat for
> something which is strictly asthetic.

What about copy? AFAIK, copy doesn't allow column names being specified,
so it's not purely aesthetic...




^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
@ 2002-10-12 15:45   ` Bruno Wolff III <[email protected]>
  2002-10-12 20:36     ` \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Bruno Wolff III @ 2002-10-12 15:45 UTC (permalink / raw)
  To: Antti Haapala <[email protected]>; +Cc: Gavin Sherry <[email protected]>; Hannu Krosing <[email protected]>; pgsql-hackers

On Sat, Oct 12, 2002 at 12:43:37 +0300,
  Antti Haapala <[email protected]> wrote:
> 
> > I cannot think of any reason why changing column order should be
> > implemented in Postgres. Seems like a waste of time/more code bloat for
> > something which is strictly asthetic.
> 
> What about copy? AFAIK, copy doesn't allow column names being specified,
> so it's not purely aesthetic...

The SQL COPY command does (at least in 7.3). The \copy psql command
doesn't seem to allow this though.



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* \copy needs work (was Re: Changing Column Order)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
  2002-10-12 15:45   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruno Wolff III <[email protected]>
@ 2002-10-12 20:36     ` Tom Lane <[email protected]>
  2002-10-14 03:45       ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Tom Lane @ 2002-10-12 20:36 UTC (permalink / raw)
  To: Bruno Wolff III <[email protected]>; +Cc: Antti Haapala <[email protected]>; Gavin Sherry <[email protected]>; Hannu Krosing <[email protected]>; pgsql-hackers

Bruno Wolff III <[email protected]> writes:
> On Sat, Oct 12, 2002 at 12:43:37 +0300,
>   Antti Haapala <[email protected]> wrote:
>> What about copy? AFAIK, copy doesn't allow column names being specified,
>> so it's not purely aesthetic...

> The SQL COPY command does (at least in 7.3). The \copy psql command
> doesn't seem to allow this though.

That's an oversight; \copy should have been fixed for 7.3.

Do we want to look at this as a bug (okay to fix for 7.3) or a new
feature (wait for 7.4)?

I see something that I think is a must-fix omission in the same code:
it should allow a schema-qualified table name.  So I'm inclined to fix
both problems now.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: \copy needs work (was Re: Changing Column Order)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
  2002-10-12 15:45   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruno Wolff III <[email protected]>
  2002-10-12 20:36     ` \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
@ 2002-10-14 03:45       ` Bruce Momjian <[email protected]>
  2002-10-14 03:53         ` Re: \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Bruce Momjian @ 2002-10-14 03:45 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Bruno Wolff III <[email protected]>; Antti Haapala <[email protected]>; Gavin Sherry <[email protected]>; Hannu Krosing <[email protected]>; pgsql-hackers

Tom Lane wrote:
> Bruno Wolff III <[email protected]> writes:
> > On Sat, Oct 12, 2002 at 12:43:37 +0300,
> >   Antti Haapala <[email protected]> wrote:
> >> What about copy? AFAIK, copy doesn't allow column names being specified,
> >> so it's not purely aesthetic...
> 
> > The SQL COPY command does (at least in 7.3). The \copy psql command
> > doesn't seem to allow this though.
> 
> That's an oversight; \copy should have been fixed for 7.3.
> 
> Do we want to look at this as a bug (okay to fix for 7.3) or a new
> feature (wait for 7.4)?
> 
> I see something that I think is a must-fix omission in the same code:
> it should allow a schema-qualified table name.  So I'm inclined to fix
> both problems now.

I don't think we can say \copy missing columns is a bug;  we never had
it in previous release.  Seems like a missing feature.  The COPY schema
names seems valid.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: \copy needs work (was Re: Changing Column Order)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
  2002-10-12 15:45   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruno Wolff III <[email protected]>
  2002-10-12 20:36     ` \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
  2002-10-14 03:45       ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
@ 2002-10-14 03:53         ` Tom Lane <[email protected]>
  2002-10-14 04:12           ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Tom Lane @ 2002-10-14 03:53 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Bruno Wolff III <[email protected]>; Antti Haapala <[email protected]>; Gavin Sherry <[email protected]>; Hannu Krosing <[email protected]>; pgsql-hackers

Bruce Momjian <[email protected]> writes:
> Tom Lane wrote:
>> Do we want to look at this as a bug (okay to fix for 7.3) or a new
>> feature (wait for 7.4)?

> I don't think we can say \copy missing columns is a bug;  we never had
> it in previous release.  Seems like a missing feature.  The COPY schema
> names seems valid.

Well, we never had schema names in previous releases either.  So I'm not
sure that I see a bright line between these items.  The real issue is
that psql's \copy has failed to track the capabilities of backend COPY.
I think we should just fix it.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: \copy needs work (was Re: Changing Column Order)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-12 09:43 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Antti Haapala <[email protected]>
  2002-10-12 15:45   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruno Wolff III <[email protected]>
  2002-10-12 20:36     ` \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
  2002-10-14 03:45       ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
  2002-10-14 03:53         ` Re: \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
@ 2002-10-14 04:12           ` Bruce Momjian <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Bruce Momjian @ 2002-10-14 04:12 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Bruno Wolff III <[email protected]>; Antti Haapala <[email protected]>; Gavin Sherry <[email protected]>; Hannu Krosing <[email protected]>; pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <[email protected]> writes:
> > Tom Lane wrote:
> >> Do we want to look at this as a bug (okay to fix for 7.3) or a new
> >> feature (wait for 7.4)?
> 
> > I don't think we can say \copy missing columns is a bug;  we never had
> > it in previous release.  Seems like a missing feature.  The COPY schema
> > names seems valid.
> 
> Well, we never had schema names in previous releases either.  So I'm not
> sure that I see a bright line between these items.  The real issue is
> that psql's \copy has failed to track the capabilities of backend COPY.
> I think we should just fix it.

OK, I added it to the open items list.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
@ 2002-10-12 09:54 ` Jeff Davis <[email protected]>
  3 siblings, 0 replies; 277+ messages in thread

From: Jeff Davis @ 2002-10-12 09:54 UTC (permalink / raw)
  To: Gavin Sherry <[email protected]>; +Cc: pgsql-hackers

> >
> > Did attlognum's (for changing column order) get implemented for 7.2 ?
>
> I cannot think of any reason why changing column order should be
> implemented in Postgres. Seems like a waste of time/more code bloat for
> something which is strictly asthetic.
>
> Regardless, I do have collegues/clients who ask when such a feature will
> be implemented. Why is this useful?
>

I think even "asthetic" might go too far. It seems mostly irrelevent except 
for people who are obsessive compulsive and operate in interactive psql a 
lot. It's marginally simpler to get the columns ordered the way you want so 
that you can just do "SELECT * ..." rather than "SELECT att0,att1,... ..." at 
the interactive psql prompt, and still get the columns in your favorite 
order.

As far as I can tell, the order the attributes are returned makes no 
difference in a client application, unless you're referencing attributes by 
number. All applications that I've made or seen all use the name instead, and 
I've never heard otherwise, or heard any advantage to using numbers to 
reference columns. 

When someone asks, ask them "why?". I'd be interested to know if they have 
some other reason. I would think that if they absolutely wanted to fine-tune 
the order of columns they'd use a view (seems a little easier than 
continually changing order around by individual SQL statements). 

Regards,
	Jeff



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
@ 2002-10-12 10:50 ` Shridhar Daithankar <[email protected]>
  3 siblings, 0 replies; 277+ messages in thread

From: Shridhar Daithankar @ 2002-10-12 10:50 UTC (permalink / raw)
  To: pgsql-hackers

On 12 Oct 2002 at 2:54, Jeff Davis wrote:

> As far as I can tell, the order the attributes are returned makes no 
> difference in a client application, unless you're referencing attributes by 
> number. All applications that I've made or seen all use the name instead, and 
> I've never heard otherwise, or heard any advantage to using numbers to 
> reference columns. 

Even in that case you can obtain field number for a given name and vise versa..

> When someone asks, ask them "why?". I'd be interested to know if they have 
> some other reason. I would think that if they absolutely wanted to fine-tune 
> the order of columns they'd use a view (seems a little easier than 
> continually changing order around by individual SQL statements). 

Sounds fine but what is about that "continually changing"? A view needs a 
change only if it alters fields selected/tables to select from/selection 
criteria. Field order does not figure in there..

Bye
 Shridhar

--
QOTD:	"A child of 5 could understand this!  Fetch me a child of 5."




^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
@ 2002-10-14 13:39 ` Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  3 siblings, 1 reply; 277+ messages in thread

From: Alessio Bragadini @ 2002-10-14 13:39 UTC (permalink / raw)
  To: pgsql-hackers

On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:

> I cannot think of any reason why changing column order should be
> implemented in Postgres. Seems like a waste of time/more code bloat for
> something which is strictly asthetic.
> 
> Regardless, I do have collegues/clients who ask when such a feature will
> be implemented. Why is this useful?

Has column ordering any effect on the physical tuple disposition? I've
heard discussions about keeping fixed-size fields at the beginning of
the tuple and similar.

Sorry for the lame question. :-)

-- 
Alessio F. Bragadini		[email protected]
APL Financial Services		http://village.albourne.com
Nicosia, Cyprus		 	phone: +357-22-755750

"It is more complicated than you think"
		-- The Eighth Networking Truth from RFC 1925




^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
@ 2002-10-14 15:04   ` Bruce Momjian <[email protected]>
  2002-10-14 15:15     ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alvaro Herrera <[email protected]>
  2002-10-15 14:37     ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Jan Wieck <[email protected]>
  0 siblings, 2 replies; 277+ messages in thread

From: Bruce Momjian @ 2002-10-14 15:04 UTC (permalink / raw)
  To: Alessio Bragadini <[email protected]>; +Cc: pgsql-hackers

Alessio Bragadini wrote:
> On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:
> 
> > I cannot think of any reason why changing column order should be
> > implemented in Postgres. Seems like a waste of time/more code bloat for
> > something which is strictly asthetic.
> > 
> > Regardless, I do have collegues/clients who ask when such a feature will
> > be implemented. Why is this useful?
> 
> Has column ordering any effect on the physical tuple disposition? I've
> heard discussions about keeping fixed-size fields at the beginning of
> the tuple and similar.
> 
> Sorry for the lame question. :-)

Yes, column ordering matches physical column ordering in the file, and
yes, there is a small penalty for accessing any columns after the first
variable-length column (pg_type.typlen < 0). CHAR() used to be a fixed
length column, but with TOAST (large offline storage) it became variable
length too.  I don't think there is much of a performance hit, though.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
@ 2002-10-14 15:15     ` Alvaro Herrera <[email protected]>
  1 sibling, 0 replies; 277+ messages in thread

From: Alvaro Herrera @ 2002-10-14 15:15 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Alessio Bragadini <[email protected]>; pgsql-hackers

On Mon, Oct 14, 2002 at 11:04:07AM -0400, Bruce Momjian wrote:
> Alessio Bragadini wrote:
> > On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:
> > 
> > > I cannot think of any reason why changing column order should be
> > > implemented in Postgres. Seems like a waste of time/more code bloat for
> > > something which is strictly asthetic.
> > 
> > Has column ordering any effect on the physical tuple disposition? I've
> > heard discussions about keeping fixed-size fields at the beginning of
> > the tuple and similar.
> 
> Yes, column ordering matches physical column ordering in the file, and
> yes, there is a small penalty for accessing any columns after the first
> variable-length column (pg_type.typlen < 0).

And note that if column ordering was to be implemented through the use
of attlognum or something similar, the physical ordering would not be
affected.  The only way to physically reoder the columns would be to
completely rebuild the table.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Aprende a avergonzarte mas ante ti que ante los demas" (Democrito)



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
@ 2002-10-15 14:37     ` Jan Wieck <[email protected]>
  2002-10-16 01:18       ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  1 sibling, 1 reply; 277+ messages in thread

From: Jan Wieck @ 2002-10-15 14:37 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Alessio Bragadini <[email protected]>; pgsql-hackers

Bruce Momjian wrote:
> 
> Alessio Bragadini wrote:
> > On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:
> >
> > > I cannot think of any reason why changing column order should be
> > > implemented in Postgres. Seems like a waste of time/more code bloat for
> > > something which is strictly asthetic.
> > >
> > > Regardless, I do have collegues/clients who ask when such a feature will
> > > be implemented. Why is this useful?
> >
> > Has column ordering any effect on the physical tuple disposition? I've
> > heard discussions about keeping fixed-size fields at the beginning of
> > the tuple and similar.
> >
> > Sorry for the lame question. :-)
> 
> Yes, column ordering matches physical column ordering in the file, and
> yes, there is a small penalty for accessing any columns after the first
> variable-length column (pg_type.typlen < 0). CHAR() used to be a fixed
> length column, but with TOAST (large offline storage) it became variable
> length too.  I don't think there is much of a performance hit, though.

When was char() fixed size? We had fixed size things like char, char2,
char4 ... char16. But char() is internally bpchar() and has allways been
variable-length.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== [email protected] #



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  2002-10-15 14:37     ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Jan Wieck <[email protected]>
@ 2002-10-16 01:18       ` Bruce Momjian <[email protected]>
  2002-10-16 03:15         ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Tom Lane <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Bruce Momjian @ 2002-10-16 01:18 UTC (permalink / raw)
  To: Jan Wieck <[email protected]>; +Cc: Alessio Bragadini <[email protected]>; pgsql-hackers

Jan Wieck wrote:
> Bruce Momjian wrote:
> > 
> > Alessio Bragadini wrote:
> > > On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:
> > >
> > > > I cannot think of any reason why changing column order should be
> > > > implemented in Postgres. Seems like a waste of time/more code bloat for
> > > > something which is strictly asthetic.
> > > >
> > > > Regardless, I do have collegues/clients who ask when such a feature will
> > > > be implemented. Why is this useful?
> > >
> > > Has column ordering any effect on the physical tuple disposition? I've
> > > heard discussions about keeping fixed-size fields at the beginning of
> > > the tuple and similar.
> > >
> > > Sorry for the lame question. :-)
> > 
> > Yes, column ordering matches physical column ordering in the file, and
> > yes, there is a small penalty for accessing any columns after the first
> > variable-length column (pg_type.typlen < 0). CHAR() used to be a fixed
> > length column, but with TOAST (large offline storage) it became variable
> > length too.  I don't think there is much of a performance hit, though.
> 
> When was char() fixed size? We had fixed size things like char, char2,
> char4 ... char16. But char() is internally bpchar() and has allways been
> variable-length.

char() was fixed size only in that you could cache the column offsets
for char() becuase it was always the same width on disk before TOAST.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  2002-10-15 14:37     ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Jan Wieck <[email protected]>
  2002-10-16 01:18       ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
@ 2002-10-16 03:15         ` Tom Lane <[email protected]>
  2002-10-16 03:19           ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 277+ messages in thread

From: Tom Lane @ 2002-10-16 03:15 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Jan Wieck <[email protected]>; Alessio Bragadini <[email protected]>; pgsql-hackers

Bruce Momjian <[email protected]> writes:
> Jan Wieck wrote:
>> When was char() fixed size?

> char() was fixed size only in that you could cache the column offsets
> for char() becuase it was always the same width on disk before TOAST.

But that was already broken by MULTIBYTE.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
  2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
  2002-10-14 13:39 ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Alessio Bragadini <[email protected]>
  2002-10-14 15:04   ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  2002-10-15 14:37     ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Jan Wieck <[email protected]>
  2002-10-16 01:18       ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Bruce Momjian <[email protected]>
  2002-10-16 03:15         ` Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) Tom Lane <[email protected]>
@ 2002-10-16 03:19           ` Bruce Momjian <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Bruce Momjian @ 2002-10-16 03:19 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Jan Wieck <[email protected]>; Alessio Bragadini <[email protected]>; pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <[email protected]> writes:
> > Jan Wieck wrote:
> >> When was char() fixed size?
> 
> > char() was fixed size only in that you could cache the column offsets
> > for char() becuase it was always the same width on disk before TOAST.
> 
> But that was already broken by MULTIBYTE.

Yes, I think there was conditional code that had the optimization only
for non-multibyte servers.  Of course, now multibyte is default.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 277+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 277+ messages in thread


end of thread, other threads:[~2023-01-16 19:06 UTC | newest]

Thread overview: 277+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12 08:37 Changing Column Order (Was Re: MySQL vs PostgreSQL.) Gavin Sherry <[email protected]>
2002-10-12 09:43 ` Antti Haapala <[email protected]>
2002-10-12 15:45   ` Bruno Wolff III <[email protected]>
2002-10-12 20:36     ` \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
2002-10-14 03:45       ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
2002-10-14 03:53         ` Re: \copy needs work (was Re: Changing Column Order) Tom Lane <[email protected]>
2002-10-14 04:12           ` Re: \copy needs work (was Re: Changing Column Order) Bruce Momjian <[email protected]>
2002-10-12 09:54 ` Jeff Davis <[email protected]>
2002-10-12 10:50 ` Shridhar Daithankar <[email protected]>
2002-10-14 13:39 ` Alessio Bragadini <[email protected]>
2002-10-14 15:04   ` Bruce Momjian <[email protected]>
2002-10-14 15:15     ` Alvaro Herrera <[email protected]>
2002-10-15 14:37     ` Jan Wieck <[email protected]>
2002-10-16 01:18       ` Bruce Momjian <[email protected]>
2002-10-16 03:15         ` Tom Lane <[email protected]>
2002-10-16 03:19           ` Bruce Momjian <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>

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