aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-04-20 11:03:58 +0100
committerChristopher Baines <mail@cbaines.net>2023-04-20 11:03:58 +0100
commit2fa4ef7c86ff45dafd5f92441776c10515c7d993 (patch)
treef7173106c9cf4d6ba10837800fff8c049d82ece9 /guix-qa-frontpage
parentd4a381650b792d2185f551a53d9f2debae824d99 (diff)
downloadqa-frontpage-2fa4ef7c86ff45dafd5f92441776c10515c7d993.tar
qa-frontpage-2fa4ef7c86ff45dafd5f92441776c10515c7d993.tar.gz
Correct database read and write delay logging
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r--guix-qa-frontpage/database.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/guix-qa-frontpage/database.scm b/guix-qa-frontpage/database.scm
index d924f31..22f8173 100644
--- a/guix-qa-frontpage/database.scm
+++ b/guix-qa-frontpage/database.scm
@@ -124,7 +124,7 @@ SELECT name FROM sqlite_master WHERE type = 'table' AND name = :name")))
#:delay-logger (let ((delay-metric
(make-histogram-metric
metrics-registry
- "datastore_write_delay_seconds")))
+ "datastore_read_delay_seconds")))
(lambda (seconds-delayed)
(metric-observe delay-metric
;; TODO exact->inexact to work around
@@ -132,11 +132,11 @@ SELECT name FROM sqlite_master WHERE type = 'table' AND name = :name")))
;; the metric sum will output in the
;; exact form including the /q
(exact->inexact seconds-delayed))
- (log-delay "datastore write" seconds-delayed)
+ (log-delay "datastore read" seconds-delayed)
(when (> seconds-delayed 1)
(format
(current-error-port)
- "warning: database write delayed by ~1,2f seconds~%"
+ "warning: database read delayed by ~1,2f seconds~%"
seconds-delayed))))
#:log-exception?
(lambda (exn)
@@ -162,7 +162,7 @@ SELECT name FROM sqlite_master WHERE type = 'table' AND name = :name")))
#:delay-logger (let ((delay-metric
(make-histogram-metric
metrics-registry
- "datastore_read_delay_seconds")))
+ "datastore_write_delay_seconds")))
(lambda (seconds-delayed)
(metric-observe delay-metric
;; TODO exact->inexact to work around
@@ -170,11 +170,11 @@ SELECT name FROM sqlite_master WHERE type = 'table' AND name = :name")))
;; the metric sum will output in the
;; exact form including the /q
(exact->inexact seconds-delayed))
- (log-delay "datastore read" seconds-delayed)
+ (log-delay "datastore write" seconds-delayed)
(when (> seconds-delayed 1)
(format
(current-error-port)
- "warning: database read delayed by ~1,2f seconds~%"
+ "warning: database write delayed by ~1,2f seconds~%"
seconds-delayed)))))))
(make-database database-file