FV: handle empty-timeline cases more gracefully

This commit is contained in:
James Swaine 2012-10-10 11:44:58 -05:00
parent 39f2185856
commit 4a64b81562
2 changed files with 3 additions and 1 deletions

View File

@ -340,6 +340,8 @@
(when (null? log-output)
(error 'build-trace "Empty timeline in log-output"))
(define-values (fst last) (first-and-last-fevents log-output))
(when (and (not fst) (not last)) ;If the log has no future events (only GC's) no timeline
(error 'build-trace "Empty timeline in log-output"))
(define start-time (future-event-time fst))
(define end-time (future-event-time last))
(define data (organize-output log-output start-time end-time))

View File

@ -97,7 +97,7 @@
(values (min screen-w DEF-WINDOW-WIDTH)
(min screen-h DEF-WINDOW-HEIGHT)))
(define COMFORTABLE-TL-LEN 10000)
(define COMFORTABLE-TL-LEN 5000)
(define (show-visualizer #:timeline [timeline #f])
(define the-tl (if timeline timeline (timeline-events)))