agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
262+ messages / 2 participants
[nested] [flat]

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06  Andres Freund <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 262+ messages in thread

* [PATCH v7 2/6] Handle pg_get_viewdef default args in system_functions.sql
@ 2025-12-09 17:33  Mark Wong <[email protected]>
  0 siblings, 0 replies; 262+ messages in thread

From: Mark Wong @ 2025-12-09 17:33 UTC (permalink / raw)

Modernize pg_get_viewdef to use proargdefaults to handle the optional
pretty argument for both versions that use OID or view name.
---
 src/backend/utils/adt/ruleutils.c | 44 -------------------------------
 src/include/catalog/pg_proc.dat   | 17 +++++-------
 2 files changed, 6 insertions(+), 55 deletions(-)

diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 6a4c7e4822d..1202cb07c07 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -669,25 +669,6 @@ pg_get_ruledef_worker(Oid ruleoid, int prettyFlags)
  */
 Datum
 pg_get_viewdef(PG_FUNCTION_ARGS)
-{
-	/* By OID */
-	Oid			viewoid = PG_GETARG_OID(0);
-	int			prettyFlags;
-	char	   *res;
-
-	prettyFlags = PRETTYFLAG_INDENT;
-
-	res = pg_get_viewdef_worker(viewoid, prettyFlags, WRAP_COLUMN_DEFAULT);
-
-	if (res == NULL)
-		PG_RETURN_NULL();
-
-	PG_RETURN_TEXT_P(string_to_text(res));
-}
-
-
-Datum
-pg_get_viewdef_ext(PG_FUNCTION_ARGS)
 {
 	/* By OID */
 	Oid			viewoid = PG_GETARG_OID(0);
@@ -727,31 +708,6 @@ pg_get_viewdef_wrap(PG_FUNCTION_ARGS)
 
 Datum
 pg_get_viewdef_name(PG_FUNCTION_ARGS)
-{
-	/* By qualified name */
-	text	   *viewname = PG_GETARG_TEXT_PP(0);
-	int			prettyFlags;
-	RangeVar   *viewrel;
-	Oid			viewoid;
-	char	   *res;
-
-	prettyFlags = PRETTYFLAG_INDENT;
-
-	/* Look up view name.  Can't lock it - we might not have privileges. */
-	viewrel = makeRangeVarFromNameList(textToQualifiedNameList(viewname));
-	viewoid = RangeVarGetRelid(viewrel, NoLock, false);
-
-	res = pg_get_viewdef_worker(viewoid, prettyFlags, WRAP_COLUMN_DEFAULT);
-
-	if (res == NULL)
-		PG_RETURN_NULL();
-
-	PG_RETURN_TEXT_P(string_to_text(res));
-}
-
-
-Datum
-pg_get_viewdef_name_ext(PG_FUNCTION_ARGS)
 {
 	/* By qualified name */
 	text	   *viewname = PG_GETARG_TEXT_PP(0);
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 954f611de5b..8d81dcdc2f6 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -3981,13 +3981,6 @@
 { oid => '8302', descr => 'source text of a property graph',
   proname => 'pg_get_propgraphdef', provolatile => 's', prorettype => 'text',
   proargtypes => 'oid', prosrc => 'pg_get_propgraphdef' },
-{ oid => '1640', descr => 'select statement of a view',
-  proname => 'pg_get_viewdef', provolatile => 's', proparallel => 'r',
-  prorettype => 'text', proargtypes => 'text',
-  prosrc => 'pg_get_viewdef_name' },
-{ oid => '1641', descr => 'select statement of a view',
-  proname => 'pg_get_viewdef', provolatile => 's', proparallel => 'r',
-  prorettype => 'text', proargtypes => 'oid', prosrc => 'pg_get_viewdef' },
 { oid => '1642', descr => 'role name by OID (with fallback)',
   proname => 'pg_get_userbyid', provolatile => 's', prorettype => 'name',
   proargtypes => 'oid', prosrc => 'pg_get_userbyid' },
@@ -8593,15 +8586,17 @@
   proargtypes => 'oid bool', proargnames => '{rule,pretty}',
   proargdefaults => '{false}',prosrc => 'pg_get_ruledef' },
 { oid => '2505',
-  descr => 'select statement of a view with pretty-print option',
+  descr => 'select statement of a view',
   proname => 'pg_get_viewdef', provolatile => 's', proparallel => 'r',
   prorettype => 'text', proargtypes => 'text bool',
-  prosrc => 'pg_get_viewdef_name_ext' },
+  proargnames => '{view,pretty}', proargdefaults => '{false}',
+  prosrc => 'pg_get_viewdef_name' },
 { oid => '2506',
-  descr => 'select statement of a view with pretty-print option',
+  descr => 'select statement of a view',
   proname => 'pg_get_viewdef', provolatile => 's', proparallel => 'r',
   prorettype => 'text', proargtypes => 'oid bool',
-  prosrc => 'pg_get_viewdef_ext' },
+  proargnames => '{view,pretty}', proargdefaults => '{false}',
+  prosrc => 'pg_get_viewdef' },
 { oid => '3159',
   descr => 'select statement of a view with pretty-printing and specified line wrapping',
   proname => 'pg_get_viewdef', provolatile => 's', proparallel => 'r',
-- 
2.52.0


--GzYugJnip6WHHvTk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
	filename=v7-0003-Handle-pg_get_indexdef-default-args-in-system_fun.patch



^ permalink  raw  reply  [nested|flat] 262+ messages in thread


end of thread, other threads:[~2025-12-09 17:33 UTC | newest]

Thread overview: 262+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2025-12-09 17:33 [PATCH v7 2/6] Handle pg_get_viewdef default args in system_functions.sql Mark Wong <[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