agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
261+ messages / 1 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; 261+ messages in thread

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

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

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


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



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

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

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

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

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread

* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
  0 siblings, 0 replies; 261+ messages in thread

From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)

Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/portability/instr_time.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
  * INSTR_TIME_SET_CURRENT_LAZY(t)	set t to current time if t is zero,
  *									evaluates to whether t changed
  *
+ * INSTR_TIME_SET_SECOND(t, s)		set t to s seconds
+ *
  * INSTR_TIME_ADD(x, y)				x += y
  *
  * INSTR_TIME_SUBTRACT(x, y)		x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_clock_gettime_ns())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = NS_PER_S * (s))
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (t))
 
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
 #define INSTR_TIME_SET_CURRENT(t) \
 	((t) = pg_query_performance_counter())
 
+#define INSTR_TIME_SET_SECONDS(t, s) \
+	((t) = s * GetTimerFrequency())
+
 #define INSTR_TIME_GET_NANOSEC(t) \
 	((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
 
-- 
2.38.0


--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"



^ permalink  raw  reply  [nested|flat] 261+ messages in thread


end of thread, other threads:[~2023-01-16 19:06 UTC | newest]

Thread overview: 261+ 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]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox