Index: benchmarks/run.js |
=================================================================== |
--- benchmarks/run.js (revision 549) |
+++ benchmarks/run.js (working copy) |
@@ -33,17 +33,27 @@ |
load('raytrace.js'); |
load('earley-boyer.js'); |
+var success = true; |
function PrintResult(name, result) { |
print(name + ': ' + result); |
} |
+function PrintError(name, error) { |
+ PrintResult(name, error); |
+ success = false; |
+} |
+ |
+ |
function PrintScore(score) { |
- print('----'); |
- print('Score (version ' + BenchmarkSuite.version + '): ' + score); |
+ if (success) { |
+ print('----'); |
+ print('Score (version ' + BenchmarkSuite.version + '): ' + score); |
+ } |
} |
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult, |
+ NotifyError: PrintError, |
NotifyScore: PrintScore }); |