summaryrefslogtreecommitdiff
path: root/paste/debug
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-01-07 22:14:03 +0000
committerianb <devnull@localhost>2006-01-07 22:14:03 +0000
commit9454b6b75cfee4b6ac8327d39a2a0ff828f508ce (patch)
treec69165879c6153d8e3bd6a4d50ebad7a96659f6c /paste/debug
parente74273a11b048ec1f4c4ed0a6712e15376d15b97 (diff)
downloadpaste-9454b6b75cfee4b6ac8327d39a2a0ff828f508ce.tar.gz
Added a little argument to profile.profile_decorator, to allow conditional profiling; added an entry point for the built-in http server, so you can use egg:Paste#http in paste.deploy files; small doc update; got rid of MANIFEST.in, which I don't believe is actually needed to make a proper package (and might actually hurt, since setuptools handles things itself when MANIFEST.in doesn't exist).
Diffstat (limited to 'paste/debug')
-rw-r--r--paste/debug/profile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/paste/debug/profile.py b/paste/debug/profile.py
index b112041..6fdc48e 100644
--- a/paste/debug/profile.py
+++ b/paste/debug/profile.py
@@ -124,8 +124,15 @@ def profile_decorator(**options):
log_filename:
The temporary filename to log profiling data to. Default;
``./profile_data.log.tmp``
+ no_profile:
+ If true, then don't actually profile anything. Useful for
+ conditional profiling.
"""
+ if options.get('no_profile'):
+ def decorator(func):
+ return func
+ return decorator
def decorator(func):
def replacement(*args, **kw):
return DecoratedProfile(func, **options)(*args, **kw)