From a61d81bbc77ebe9635e7dd52fe738638a92141a3 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Tue, 12 Nov 2024 13:12:08 -0600 Subject: [PATCH] Calculate compute_backpressure_throttling_seconds correctly The original value that we get is measured in microseconds. It comes from a calculation using Postgres' GetCurrentTimestamp(), whihc is implemented in terms of gettimeofday(2). Signed-off-by: Tristan Partin --- .../sql_exporter/compute_backpressure_throttling_seconds.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql index 459c586d18..d97d625d4c 100644 --- a/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql +++ b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql @@ -1 +1 @@ -SELECT neon.backpressure_throttling_time()::float8 / 1000 AS throttled; +SELECT (neon.backpressure_throttling_time()::float8 / 1000000) AS throttled;