From 2df436d29c4c2d28533cde42a837c37ab8308e0d Mon Sep 17 00:00:00 2001 From: Burke Fetscher Date: Tue, 25 Feb 2014 22:22:02 -0600 Subject: [PATCH] redex: adjust benchmark time calculations also dont' add timeouts to totals --- .../redex/examples/benchmark/test-file.rkt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/redex-pkgs/redex-examples/redex/examples/benchmark/test-file.rkt b/pkgs/redex-pkgs/redex-examples/redex/examples/benchmark/test-file.rkt index e020076d2f..42d785a982 100644 --- a/pkgs/redex-pkgs/redex-examples/redex/examples/benchmark/test-file.rkt +++ b/pkgs/redex-pkgs/redex-examples/redex/examples/benchmark/test-file.rkt @@ -86,20 +86,19 @@ (cond [((/ tot-time 1000) . > . seconds) (when verbose? - (printf "Quitting after ~s iterations and ~s milliseconds\n ~s terms/sec\n" - (+ i terms) tot-time (exact->inexact (/ (+ i terms) (/ tot-time 1000))))) + (printf "Quitting after ~s iterations and ~s milliseconds\n ~s terms/sec\n" + (+ i terms) tot-time (exact->inexact (/ (+ i terms) (/ tot-time 1000))))) (void)] [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" fname type) - (displayln i) - (loop (add1 i))))) + (trials-loop t)))) (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" fname type term) - (loop (add1 i))))) + (trials-loop t)))) (cond [(not ok?) (when verbose?