Author: Lars Wassermann <lars.wasserm...@gmail.com> Branch: Changeset: r151:b4e0907d6045 Date: 2013-03-08 15:34 +0100 http://bitbucket.org/pypy/lang-smalltalk/changeset/b4e0907d6045/
Log: (cfbolz, lwassermann): added conditional printing of results and additional time-measuring of perform diff --git a/targetimageloadingsmalltalk.py b/targetimageloadingsmalltalk.py --- a/targetimageloadingsmalltalk.py +++ b/targetimageloadingsmalltalk.py @@ -1,4 +1,4 @@ -import sys +import sys, time import os from rpython.rlib.streamio import open_file_as_stream @@ -10,14 +10,17 @@ def _run_benchmark(interp, number, benchmark): w_object = model.W_SmallInteger(number) + t1 = time.time() try: w_result = interp.perform(w_object, benchmark) except interpreter.ReturnFromTopLevel, e: w_result = e.object + t2 = time.time() if w_result: - assert isinstance(w_result, model.W_BytesObject) - print '\n' - print w_result.as_string() + if isinstance(w_result, model.W_BytesObject): + print '\n' + print w_result.as_string() + print "took %s seconds" % (t2 - t1) return 0 return -1 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit