agora inbox for [email protected]
help / color / mirror / Atom feedRE: pg_user backtrace -- with ElectricFence (looks useful :)
262+ messages / 2 participants
[nested] [flat]
* RE: pg_user backtrace -- with ElectricFence (looks useful :)
@ 1998-09-10 20:07 Taral <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Taral @ 1998-09-10 20:07 UTC (permalink / raw)
To: Taral <[email protected]>; [email protected]
Oops! Here's the Makefile.custom:
CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -O1 -g3
LDFLAGS:=-lefence $(LDFLAGS)
> -----Original Message-----
> From: Taral [mailto:[email protected]]
> Sent: Thursday, September 10, 1998 3:00 PM
> To: [email protected]
> Subject: pg_user backtrace -- with ElectricFence (looks useful :)
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
* [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND()
@ 2023-01-16 19:06 Andres Freund <[email protected]>
0 siblings, 0 replies; 262+ messages in thread
From: Andres Freund @ 2023-01-16 19:06 UTC (permalink / raw)
Useful to calculate the end of a time-bound loop without having to convert
into time units (which is costly).
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
src/include/portability/instr_time.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index 185be8d5cad..91492c62a39 100644
--- a/src/include/portability/instr_time.h
+++ b/src/include/portability/instr_time.h
@@ -22,6 +22,8 @@
* INSTR_TIME_SET_CURRENT_LAZY(t) set t to current time if t is zero,
* evaluates to whether t changed
*
+ * INSTR_TIME_SET_SECOND(t, s) set t to s seconds
+ *
* INSTR_TIME_ADD(x, y) x += y
*
* INSTR_TIME_SUBTRACT(x, y) x -= y
@@ -114,6 +116,9 @@ pg_clock_gettime_ns(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_clock_gettime_ns())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = NS_PER_S * (s))
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (t))
@@ -146,6 +151,9 @@ GetTimerFrequency(void)
#define INSTR_TIME_SET_CURRENT(t) \
((t) = pg_query_performance_counter())
+#define INSTR_TIME_SET_SECONDS(t, s) \
+ ((t) = s * GetTimerFrequency())
+
#define INSTR_TIME_GET_NANOSEC(t) \
((uint64) (((t) * NS_PER_S) / GetTimerFrequency()))
--
2.38.0
--ftp5i6iirmkwy7na
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0004-wip-report-nanoseconds-in-pg_test_timing.patch"
^ permalink raw reply [nested|flat] 262+ messages in thread
end of thread, other threads:[~2023-01-16 19:06 UTC | newest]
Thread overview: 262+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-10 20:07 RE: pg_user backtrace -- with ElectricFence (looks useful :) Taral <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() Andres Freund <[email protected]>
2023-01-16 19:06 [PATCH v7 3/4] instr_time: Add INSTR_TIME_SET_SECOND() 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