fix TR shotout benchmark driver for Racket CS

This commit is contained in:
Matthew Flatt 2019-04-30 16:33:33 -06:00
parent 97cba287d0
commit 6771bddb59

View File

@ -49,25 +49,28 @@ exec racket -qu "$0" ${1+"$@"}
(delete-file (build-path compiled "current-bm_rkt.zo"))))
(define (mk-typed-racket-non-optimizing bm)
(unless (directory-exists? "typed/compiled")
(make-directory "typed/compiled"))
(define compiled (build-path "typed" (car (use-compiled-file-paths))))
(unless (directory-exists? compiled)
(make-directory compiled))
(parameterize ([current-namespace (make-base-namespace)]
[read-accept-reader #t])
(let ([name (format "~a-non-optimizing.rkt" bm)])
(compile-file (format "typed/~a" name)
"typed/compiled/current-bm_rkt.zo"))))
(build-path compiled "current-bm_rkt.zo")))))
(define (mk-typed-racket bm)
(unless (directory-exists? "typed/compiled")
(make-directory "typed/compiled"))
(define compiled (build-path "typed" (car (use-compiled-file-paths))))
(unless (directory-exists? compiled)
(make-directory compiled))
(parameterize ([current-namespace (make-base-namespace)]
[read-accept-reader #t])
(let ([name (format "~a-optimizing.rkt" bm)])
(compile-file (format "typed/~a" name)
"typed/compiled/current-bm_rkt.zo"))))
(build-path compiled "current-bm_rkt.zo")))))
(define (clean-up-typed bm)
(when (file-exists? "typed/compiled/current-bm_rkt.zo")
(delete-file "typed/compiled/current-bm_rkt.zo")))
(define compiled (build-path "typed" (car (use-compiled-file-paths))))
(when (file-exists? (build-path compiled "current-bm_rkt.zo"))
(delete-file (build-path compiled "current-bm_rkt.zo"))))
(define (extract-racket-times bm str)
(let ([m (regexp-match #rx#"cpu time: ([0-9]+) real time: ([0-9]+) gc time: ([0-9]+)" str)])