benchmark: wrap the error in <test-failure>

Piggybacks on the test-failure error. word so that we get a traceback if
an error occurs during benchmarking. To make it easier to debug the "No
suitable arithmetic method" random error #1484
db4
Björn Lindqvist 2015-12-17 18:57:52 +01:00
parent a738c356a0
commit 1835e7c248
1 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs continuations debugger formatting fry help.markup
io io.styles kernel math memory prettyprint sequences
tools.profiler.sampling tools.time vocabs.hierarchy vocabs.loader ;
tools.profiler.sampling tools.test tools.time vocabs.hierarchy vocabs.loader ;
IN: benchmark
: run-timing-benchmark ( vocab -- time )
@ -20,7 +20,9 @@ IN: benchmark
"=== %s\n" printf ;
: run-benchmark ( vocab quot: ( vocab -- res ) -- result ok? )
over write-header '[ _ @ t ] [ f ] recover ; inline
over write-header '[ _ @ t ] [
f f f <test-failure> f
] recover ; inline
PRIVATE>