Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 5090388

Browse files
committed
fix profile_vm.py script
1 parent 1d7617e commit 5090388

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ethereum/tests/profile_vm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import ethereum.testutils as testutils
44
import cProfile
55
import pstats
6-
import StringIO
6+
from io import StringIO
77
import time
88
from rlp.utils import encode_hex
9-
from ethereum.utils import sha3
9+
from ethereum.utils import sha3, to_string
1010
from ethereum.slogging import get_logger
1111
logger = get_logger()
1212

@@ -31,15 +31,15 @@ def run(profiler=None):
3131
if i == num:
3232
break
3333
do_test_vm(filename, testname, testdata, profiler=profiler)
34-
seen += str(testname)
34+
seen += to_string(testname)
3535
i += 1
3636
print('ran %d tests' % i)
3737
print('test key', encode_hex(sha3(seen)))
3838

3939
if len(sys.argv) == 1:
4040
pr = cProfile.Profile()
4141
run(pr)
42-
s = StringIO.StringIO()
42+
s = StringIO()
4343
sortby = 'tottime'
4444
ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
4545
ps.print_stats(50)

0 commit comments

Comments
 (0)