Skip to content

Commit

Permalink
add an errortrace benchmarking mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mflatt committed Mar 5, 2016
1 parent bfb1463 commit 3d484cf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkgs/racket-benchmarks/tests/racket/benchmarks/common/auto.rkt
Expand Up @@ -48,6 +48,19 @@ exec racket -qu "$0" ${1+"$@"}
(compile-file name
"compiled/current-bm_rkt.zo"))))

(define (mk-errortrace bm)
(unless (directory-exists? "compiled")
(make-directory "compiled"))
(parameterize ([current-namespace (make-base-namespace)]
[read-accept-reader #t]
[current-compile (current-compile)]
[error-display-handler (error-display-handler)]
[use-compiled-file-paths (use-compiled-file-paths)])
(dynamic-require 'errortrace #f)
(let ([name (format "~a.rkt" bm)])
(compile-file name
"compiled/current-bm_rkt.zo"))))

(define (compiled-path bm)
"current-bm.rkt")

Expand Down Expand Up @@ -395,6 +408,14 @@ exec racket -qu "$0" ${1+"$@"}
extract-racket-times
clean-up-zo
racket-skip-progs)
(make-impl 'errortrace
void
mk-errortrace
(lambda (bm)
(system (format "racket -l errortrace -u ~a" (compiled-path bm))))
extract-racket-times
clean-up-zo
racket-skip-progs)
(make-impl 'plt-r5rs
void
mk-plt-r5rs
Expand Down

0 comments on commit 3d484cf

Please sign in to comment.