Add builds per machine metric table.
This commit is contained in:
parent
f6008378be
commit
48f630f9f7
|
@ -274,6 +274,9 @@ Hydra format."
|
||||||
#:builds-per-day
|
#:builds-per-day
|
||||||
(db-get-metrics-with-id 'builds-per-day
|
(db-get-metrics-with-id 'builds-per-day
|
||||||
#:limit 100)
|
#:limit 100)
|
||||||
|
#:builds-per-machine
|
||||||
|
(db-get-metrics-with-id 'builds-per-machine-per-day
|
||||||
|
#:order "field ASC")
|
||||||
#:eval-completion-speed
|
#:eval-completion-speed
|
||||||
(db-get-metrics-with-id 'evaluation-completion-speed
|
(db-get-metrics-with-id 'evaluation-completion-speed
|
||||||
#:limit 100
|
#:limit 100
|
||||||
|
|
|
@ -308,6 +308,7 @@ to_timestamp(stoptime)::date > 'today'::date - interval '1 day'"))))
|
||||||
;; Builds count per machine during the last day.
|
;; Builds count per machine during the last day.
|
||||||
(metric
|
(metric
|
||||||
(id 'builds-per-machine-per-day)
|
(id 'builds-per-machine-per-day)
|
||||||
|
(field-type 'string)
|
||||||
(compute-proc db-builds-count-per-machine))))
|
(compute-proc db-builds-count-per-machine))))
|
||||||
|
|
||||||
(define (metric->type metric)
|
(define (metric->type metric)
|
||||||
|
|
|
@ -1314,6 +1314,7 @@ window.~a = new Chart\
|
||||||
avg-eval-durations
|
avg-eval-durations
|
||||||
avg-eval-build-start-time
|
avg-eval-build-start-time
|
||||||
builds-per-day
|
builds-per-day
|
||||||
|
builds-per-machine
|
||||||
eval-completion-speed
|
eval-completion-speed
|
||||||
new-derivations-per-day
|
new-derivations-per-day
|
||||||
pending-builds
|
pending-builds
|
||||||
|
@ -1337,6 +1338,14 @@ window.~a = new Chart\
|
||||||
"%"))
|
"%"))
|
||||||
(map cdr percentages)))))
|
(map cdr percentages)))))
|
||||||
|
|
||||||
|
(define (builds-per-machine-rows builds)
|
||||||
|
(map (match-lambda
|
||||||
|
((field . value)
|
||||||
|
`(tr (td ,field)
|
||||||
|
(td ,(number->string
|
||||||
|
(nearest-exact-integer value))))))
|
||||||
|
builds))
|
||||||
|
|
||||||
(define (builds->json-scm builds)
|
(define (builds->json-scm builds)
|
||||||
(apply vector
|
(apply vector
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
|
@ -1394,6 +1403,15 @@ completed builds divided by the time required to build them.")
|
||||||
(br)
|
(br)
|
||||||
(canvas (@ (id ,pending-builds-chart)))
|
(canvas (@ (id ,pending-builds-chart)))
|
||||||
(br)
|
(br)
|
||||||
|
(h6 "Builds per machine.")
|
||||||
|
(p "This is the builds count per machine during the last day.")
|
||||||
|
(table
|
||||||
|
(@ (class "table table-sm table-hover table-striped"))
|
||||||
|
(thead (tr (th (@ (scope "col")) "Machine")
|
||||||
|
(th (@ (scope "col")) "Builds (last 24 hours)")))
|
||||||
|
(tbody
|
||||||
|
,(builds-per-machine-rows builds-per-machine)))
|
||||||
|
(br)
|
||||||
(h6 "Percentage of failed evaluations.")
|
(h6 "Percentage of failed evaluations.")
|
||||||
(table
|
(table
|
||||||
(@ (class "table table-sm table-hover table-striped"))
|
(@ (class "table table-sm table-hover table-striped"))
|
||||||
|
|
Loading…
Reference in New Issue