(define (profile-measurements)
(let* ((t (times))
(stats (gc-stats)))
-
+
(list
(- (tms:utime t)
(ly:assoc-get 'gc-time-taken stats))
))
(let* ((failed '())
- (start-measurements #f)
+ (start-measurements (ly:get-option 'profile-measurements))
(handler (lambda (key failed-file)
(set! failed (append (list failed-file) failed)))))
(lambda (x)
(gc)
- (set! start-measurements (profile-measurements))
+ (if start-measurements
+ (set! start-measurements (profile-measurements)))
(lilypond-file handler x)
(if (ly:get-option 'dump-profile)
(dump-profile x start-measurements (profile-measurements)))