build-system/gnu: Report the execution time of each phase.
* guix/build/gnu-build-system.scm (gnu-build): Report the success or failure of each phase and its execution time.
This commit is contained in:
parent
f5b7894942
commit
4c377e861b
|
@ -20,6 +20,7 @@
|
||||||
#:use-module (guix build utils)
|
#:use-module (guix build utils)
|
||||||
#:use-module (ice-9 ftw)
|
#:use-module (ice-9 ftw)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (ice-9 format)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:export (%standard-phases
|
#:export (%standard-phases
|
||||||
|
@ -267,6 +268,11 @@ in order. Return #t if all the PHASES succeeded, #f otherwise."
|
||||||
;; PHASES can pick the keyword arguments it's interested in.
|
;; PHASES can pick the keyword arguments it's interested in.
|
||||||
(every (match-lambda
|
(every (match-lambda
|
||||||
((name . proc)
|
((name . proc)
|
||||||
|
(let ((start (gettimeofday)))
|
||||||
(format #t "starting phase `~a'~%" name)
|
(format #t "starting phase `~a'~%" name)
|
||||||
(apply proc args)))
|
(let ((result (apply proc args))
|
||||||
|
(end (gettimeofday)))
|
||||||
|
(format #t "phase `~a' ~:[failed~;succeeded~] after ~a seconds~%"
|
||||||
|
name result (- (car end) (car start)))
|
||||||
|
result))))
|
||||||
phases))
|
phases))
|
||||||
|
|
Loading…
Reference in New Issue