From 7cf64050f8d8dc18d58698d0add35c6119b0ed21 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 27 Apr 2011 17:03:59 -0400 Subject: [PATCH] Make tabulation script more resilient to incorrect input. --- collects/tests/racket/benchmarks/common/tabulate.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/tests/racket/benchmarks/common/tabulate.rkt b/collects/tests/racket/benchmarks/common/tabulate.rkt index d284938008..5db0bae47e 100755 --- a/collects/tests/racket/benchmarks/common/tabulate.rkt +++ b/collects/tests/racket/benchmarks/common/tabulate.rkt @@ -99,7 +99,8 @@ exec racket -qu "$0" ${1+"$@"} #f)]) (if a ;; compute cpu, real and gc average time for the nothing benchmark - (let ([nothing-runs (map car a)]) + (let ([nothing-runs (map (lambda (x) (map (lambda (y) (or y 0)) x)) + (map car a))]) (map (lambda (x) (exact->inexact (/ x (length nothing-runs)))) (foldl (lambda (x y) (map + x y)) '(0 0 0)