From 4b614b9b35cd2baddb7ca67c04bee5d70ec6a172 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 27 Apr 2013 19:53:57 -0400 Subject: - the raw 2to3 run - went through examples/ and cleaned out excess list() calls --- test/perf/objselectspeed.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/perf/objselectspeed.py') diff --git a/test/perf/objselectspeed.py b/test/perf/objselectspeed.py index c0ed88444..dc790ab17 100644 --- a/test/perf/objselectspeed.py +++ b/test/perf/objselectspeed.py @@ -36,7 +36,7 @@ def setup(): metadata.create_all() i = Person_table.insert() data = [{'name':'John Doe','sex':1,'age':35, 'type':'employee'}] * 100 - for j in xrange(500): + for j in range(500): i.execute(data) # note we arent fetching from employee_table, @@ -46,7 +46,7 @@ def setup(): #for j in xrange(500): # i.execute(data) - print "Inserted 50,000 rows" + print("Inserted 50,000 rows") def sqlite_select(entity_cls): conn = db.connect().connection @@ -89,10 +89,10 @@ def all(): t, t2 = 0, 0 def usage(label): now = resource.getrusage(resource.RUSAGE_SELF) - print "%s: %0.3fs real, %0.3fs user, %0.3fs sys" % ( + print("%s: %0.3fs real, %0.3fs user, %0.3fs sys" % ( label, t2 - t, now.ru_utime - usage.last.ru_utime, - now.ru_stime - usage.last.ru_stime) + now.ru_stime - usage.last.ru_stime)) usage.snap(now) usage.snap = lambda stats=None: setattr( usage, 'last', stats or resource.getrusage(resource.RUSAGE_SELF)) -- cgit v1.2.1