Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1654

Show
Ignore:
Timestamp:
05/03/07 23:13:17
Author:
dowski
Message:

Added support for passing **params in the profiler (trunk).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/profiler.py

    r1281 r1654  
    7878            os.makedirs(path) 
    7979     
    80     def run(self, func, *args): 
    81         """run(func, *args). Run func, dumping profile data into self.path.""" 
     80    def run(self, func, *args, **params): 
     81        """run(func, *args, **params). Dumps profile data into self.path.""" 
    8282        global _count 
    8383        c = _count = _count + 1 
    8484        path = os.path.join(self.path, "cp_%04d.prof" % c) 
    8585        prof = profile.Profile() 
    86         result = prof.runcall(func, *args
     86        result = prof.runcall(func, *args, **params
    8787        prof.dump_stats(path) 
    8888        return result 

Hosted by WebFaction

Log in as guest/cpguest to create tickets