[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Mathieu Othacehe |
Date: |
Tue, 15 Sep 2020 08:34:49 -0400 (EDT) |
branch: master
commit ad3c603541cf85215f127e283e99096700a21fcd
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Sep 15 14:30:00 2020 +0200
metrics: Fix db-average-eval-duration-per-spec.
* src/cuirass/metrics.scm (db-average-eval-duration-per-spec): Order results
by descending rowid and adjust docstring.
---
src/cuirass/metrics.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/metrics.scm b/src/cuirass/metrics.scm
index 665b9a0..6151baf 100644
--- a/src/cuirass/metrics.scm
+++ b/src/cuirass/metrics.scm
@@ -54,12 +54,14 @@
;;;
(define* (db-average-eval-duration-per-spec spec #:key limit)
- "Return the evaluation duration of EVAL."
+ "Return the average evaluation duration for SPEC. Limit the average
+computation to the most recent LIMIT records if this argument is set."
(with-db-worker-thread db
(let ((rows (sqlite-exec db "SELECT AVG(duration) FROM
(SELECT (evaltime - timestamp) as duration
FROM Evaluations WHERE specification = " spec
-" AND evaltime != 0 LIMIT " (or limit -1) ");")))
+" AND evaltime != 0 ORDER BY rowid DESC
+LIMIT " (or limit -1) ");")))
(and=> (expect-one-row rows) (cut vector-ref <> 0)))))
(define (db-builds-previous-day _)
- master updated (cf11b73 -> f3ab04a), Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject], Mathieu Othacehe, 2020/09/15
- [no subject],
Mathieu Othacehe <=
- [no subject], Mathieu Othacehe, 2020/09/15