aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-09-15 11:11:09 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-09-15 11:11:09 +0200
commitd0a2235ec7258fc363faf4e4bcef55f744e43c76 (patch)
tree58875b8c6584a88ced54811ef170504325ecc0e4
parentf011d874564aad5981a6e3471cd5533a461fb609 (diff)
downloadcuirass-d0a2235ec7258fc363faf4e4bcef55f744e43c76.tar
cuirass-d0a2235ec7258fc363faf4e4bcef55f744e43c76.tar.gz
metrics: Change 'builds-per-day computation.
* src/cuirass/metrics.scm (db-builds-previous-day): Only take into account the builds that are created and processed during the previous day.
-rw-r--r--src/cuirass/metrics.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cuirass/metrics.scm b/src/cuirass/metrics.scm
index ea1482a..cd4e901 100644
--- a/src/cuirass/metrics.scm
+++ b/src/cuirass/metrics.scm
@@ -66,7 +66,9 @@ FROM Evaluations WHERE specification = " spec
"Return the builds count of the previous day."
(with-db-worker-thread db
(let ((rows (sqlite-exec db "SELECT COUNT(*) from Builds
-WHERE date(stoptime, 'unixepoch') = date('now', '-1 day');")))
+WHERE date(timestamp, 'unixepoch') = date('now', '-1 day') AND
+date(stoptime, 'unixepoch') = date('now', '-1 day');")))
+ (and=> (expect-one-row rows) (cut vector-ref <> 0)))))
(and=> (expect-one-row rows) (cut vector-ref <> 0)))))
(define (db-pending-builds _)