From: Mike Bayer Date: Fri, 2 Aug 2013 22:29:25 +0000 (-0400) Subject: tweaks X-Git-Tag: rel_0_9_0b1~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b79a5c25bc131bfdeaeadbf41ed1253e93161bee;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git tweaks --- diff --git a/test/perf/orm2010.py b/test/perf/orm2010.py index 4f36551c02..088563e946 100644 --- a/test/perf/orm2010.py +++ b/test/perf/orm2010.py @@ -62,9 +62,7 @@ Base.metadata.create_all(engine) sess = Session(engine) -factor = 10 - -def runit(status): +def runit(status, factor=1): num_bosses = 100 * factor num_grunts = num_bosses * 100 @@ -126,7 +124,6 @@ def runit(status): def run_with_profile(): import cProfile - import os import pstats filename = "orm2010.profile" @@ -150,7 +147,7 @@ def run_with_profile(): #stats.sort_stats('time', 'calls') #stats.print_stats() - os.system("runsnake %s" % filename) + #os.system("runsnake %s" % filename) # SQLA Version: 0.7b1 # Total calls 4956750 @@ -174,7 +171,7 @@ def run_with_time(): def status(msg): print("%d - %s" % (time.time() - now, msg)) - runit(status) + runit(status, 10) print("Total time: %d" % (time.time() - now)) run_with_time()