@@ -17,13 +17,13 @@ def do_test_vm(filename, testname=None, testdata=None, limit=99999999, profiler=
17
17
18
18
if __name__ == '__main__' :
19
19
num = 5000
20
- print 'profile_vm.py [no_cprofile]'
21
- print 'loading tests'
20
+ print ( 'profile_vm.py [no_cprofile]' )
21
+ print ( 'loading tests' )
22
22
fixtures = testutils .get_tests_from_file_or_dir (
23
23
os .path .join (testutils .fixture_path , 'VMTests' ))
24
24
25
25
def run (profiler = None ):
26
- print 'running'
26
+ print ( 'running' )
27
27
i = 0
28
28
seen = b''
29
29
for filename , tests in fixtures .items ():
@@ -33,8 +33,8 @@ def run(profiler=None):
33
33
do_test_vm (filename , testname , testdata , profiler = profiler )
34
34
seen += str (testname )
35
35
i += 1
36
- print 'ran %d tests' % i
37
- print 'test key' , sha3 (seen ).encode ('hex' )
36
+ print ( 'ran %d tests' % i )
37
+ print ( 'test key' , sha3 (seen ).encode ('hex' ) )
38
38
39
39
if len (sys .argv ) == 1 :
40
40
pr = cProfile .Profile ()
@@ -43,15 +43,14 @@ def run(profiler=None):
43
43
sortby = 'tottime'
44
44
ps = pstats .Stats (pr , stream = s ).sort_stats (sortby )
45
45
ps .print_stats (50 )
46
- print s .getvalue ()
46
+ print ( s .getvalue () )
47
47
else :
48
48
# pypy version
49
49
st = time .time ()
50
50
run ()
51
- print
52
- print 'took total' , time .time () - st
51
+ print ('took total' , time .time () - st )
53
52
try : # pypy branch
54
53
from ethereum .utils import sha3_call_counter
55
- print 'took w/o sha3' , time .time () - st - sha3_call_counter [3 ]
54
+ print ( 'took w/o sha3' , time .time () - st - sha3_call_counter [3 ])
56
55
except ImportError :
57
56
pass
0 commit comments