diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-09 23:20:00 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-09 23:20:00 -0500 |
commit | 1d4f0df35dd7232258670101bca426ec0a5d5c56 (patch) | |
tree | d66e0f3dd80baabebba9874f0c4e3a048296d21f /lib/sqlalchemy/testing/profiling.py | |
parent | b287a379e9257fe00c2ba5f01b332ebc51546cff (diff) | |
download | sqlalchemy-1d4f0df35dd7232258670101bca426ec0a5d5c56.tar.gz |
- fix some function mismatch in profiling
Diffstat (limited to 'lib/sqlalchemy/testing/profiling.py')
-rw-r--r-- | lib/sqlalchemy/testing/profiling.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/sqlalchemy/testing/profiling.py b/lib/sqlalchemy/testing/profiling.py index 8f5f3f70a..fa2490649 100644 --- a/lib/sqlalchemy/testing/profiling.py +++ b/lib/sqlalchemy/testing/profiling.py @@ -51,12 +51,10 @@ def profiled(target=None, **target_opts): if target is None: target = 'anonymous_target' - filename = "%s.prof" % target - @decorator def decorate(fn, *args, **kw): elapsed, load_stats, result = _profile( - filename, fn, *args, **kw) + fn, *args, **kw) graphic = target_opts.get('graphic', profile_config['graphic']) if graphic: @@ -66,8 +64,8 @@ def profiled(target=None, **target_opts): if report: sort_ = target_opts.get('sort', profile_config['sort']) limit = target_opts.get('limit', profile_config['limit']) - print(("Profile report for target '%s' (%s)" % ( - target, filename) + print(("Profile report for target '%s'" % ( + target, ) )) stats = load_stats() @@ -87,7 +85,6 @@ def profiled(target=None, **target_opts): if print_callees: stats.print_callees() - os.unlink(filename) return result return decorate |