diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-15 09:16:11 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-15 09:16:11 +0200 |
commit | cd2d2512e639bc111626def5c55c3471abce2946 (patch) | |
tree | ddf2089a3033d00ee882d3102f7bb2bd2faddf49 /src | |
parent | cf11b73db00678b45b70108768138d0fb74d9506 (diff) | |
download | cuirass-cd2d2512e639bc111626def5c55c3471abce2946.tar cuirass-cd2d2512e639bc111626def5c55c3471abce2946.tar.gz |
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".
Diffstat (limited to 'src')
-rw-r--r-- | src/cuirass/http.scm | 3 | ||||
-rw-r--r-- | 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)) |