diff options
author | Christian Wyglendowski <none@none> | 2007-05-04 04:13:17 +0000 |
---|---|---|
committer | Christian Wyglendowski <none@none> | 2007-05-04 04:13:17 +0000 |
commit | a77b5c78d4d19417ab3e6b3c348cf5602d37232c (patch) | |
tree | 4c9a160013860b21d065d6d9660462fd21f003d9 /cherrypy/lib/profiler.py | |
parent | 19179755e835d2357f190c83b67fa8fcde1a01be (diff) | |
download | cherrypy-git-a77b5c78d4d19417ab3e6b3c348cf5602d37232c.tar.gz |
Added support for passing **params in the profiler (trunk).
Diffstat (limited to 'cherrypy/lib/profiler.py')
-rw-r--r-- | cherrypy/lib/profiler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py index c38bb1eb..dbd2afb7 100644 --- a/cherrypy/lib/profiler.py +++ b/cherrypy/lib/profiler.py @@ -77,13 +77,13 @@ class Profiler(object): if not os.path.exists(path): os.makedirs(path) - def run(self, func, *args): - """run(func, *args). Run func, dumping profile data into self.path.""" + def run(self, func, *args, **params): + """run(func, *args, **params). Dumps profile data into self.path.""" global _count c = _count = _count + 1 path = os.path.join(self.path, "cp_%04d.prof" % c) prof = profile.Profile() - result = prof.runcall(func, *args) + result = prof.runcall(func, *args, **params) prof.dump_stats(path) return result |