diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-27 19:53:57 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-27 19:53:57 -0400 |
| commit | 4b614b9b35cd2baddb7ca67c04bee5d70ec6a172 (patch) | |
| tree | 7483cd269f5823f903f96709eb864fff9b6d9383 /test/perf/objselectspeed.py | |
| parent | 9716a5c45e6185c5871555722d8495880f0e8c7a (diff) | |
| download | sqlalchemy-4b614b9b35cd2baddb7ca67c04bee5d70ec6a172.tar.gz | |
- the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
Diffstat (limited to 'test/perf/objselectspeed.py')
| -rw-r--r-- | test/perf/objselectspeed.py | 8 |
1 files changed, 4 insertions, 4 deletions
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)) |
