]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix some function mismatch in profiling
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jan 2014 04:20:00 +0000 (23:20 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jan 2014 04:20:00 +0000 (23:20 -0500)
lib/sqlalchemy/testing/profiling.py

index 8f5f3f70a1d1fc1ebf8745fcd470e577b93ea03a..fa2490649066f415b967d5fee51c7f1a87a54cbe 100644 (file)
@@ -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