[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Mathieu Othacehe |
Date: |
Tue, 15 Sep 2020 08:34:46 -0400 (EDT) |
branch: master
commit cd2d2512e639bc111626def5c55c3471abce2946
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Sep 15 09:16:11 2020 +0200
metrics: Order by descending rowid by default.
* src/cuirass/metrics.scm (db-get-metrics-with-id): Order by descending
rowid
by default.
* src/cuirass/http.scm (url-handler): Use the default order for
"db-get-metrics-with-id".
---
src/cuirass/http.scm | 3 +--
src/cuirass/metrics.scm | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index cc88f04..b302aaf 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -612,8 +612,7 @@ Hydra format."
"Global metrics"
(let ((builds-per-day
(db-get-metrics-with-id 'builds-previous-day
- #:limit 10
- #:order "field"))
+ #:limit 10))
(avg-eval-durations
(list
(db-get-metrics-with-id
diff --git a/src/cuirass/metrics.scm b/src/cuirass/metrics.scm
index c5880e3..4721cd5 100644
--- a/src/cuirass/metrics.scm
+++ b/src/cuirass/metrics.scm
@@ -133,7 +133,7 @@ WHERE type = " type " AND field = " field ";")))
(define* (db-get-metrics-with-id id
#:key
limit
- (order "timestamp"))
+ (order "rowid DESC"))
"Return the metrics with the given ID. If LIMIT is set, the resulting list
if restricted to LIMIT records."
(let* ((metric (find-metric id))
- 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 <=
- [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