redex: adjust benchmark time calculations

also dont' add timeouts to totals
This commit is contained in:
Burke Fetscher 2014-02-25 22:22:02 -06:00
parent 3e83a816e2
commit 2df436d29c

View File

@ -86,20 +86,19 @@
(cond (cond
[((/ tot-time 1000) . > . seconds) [((/ tot-time 1000) . > . seconds)
(when verbose? (when verbose?
(printf "Quitting after ~s iterations and ~s milliseconds\n ~s terms/sec\n" (printf "Quitting after ~s iterations and ~s milliseconds\n ~s terms/sec\n"
(+ i terms) tot-time (exact->inexact (/ (+ i terms) (/ tot-time 1000))))) (+ i terms) tot-time (exact->inexact (/ (+ i terms) (/ tot-time 1000)))))
(void)] (void)]
[else [else
(define term (with-timeout (* 5 60 60) g (define term (with-timeout (* 5 60 1000) g
(λ () (printf "\nTimed out generating a test term in: ~a, ~a\n" (λ () (printf "\nTimed out generating a test term in: ~a, ~a\n"
fname type) fname type)
(displayln i) (trials-loop t))))
(loop (add1 i)))))
(define me-time (- (current-process-milliseconds) t-time)) (define me-time (- (current-process-milliseconds) t-time))
(define ok? (with-timeout (* 5 60 60) (λ () (check term)) (define ok? (with-timeout (* 5 60 1000) (λ () (check term))
(λ () (printf "\nIn ~a, ~a, timed out checking the term:~a\n" (λ () (printf "\nIn ~a, ~a, timed out checking the term:~a\n"
fname type term) fname type term)
(loop (add1 i))))) (trials-loop t))))
(cond (cond
[(not ok?) [(not ok?)
(when verbose? (when verbose?