web.web.utils.Profile

Package web :: Package web :: Module utils :: Class Profile |
[hide private]
[frames] | no frames]

# Class Profile

source code

Profiles `func` and returns a tuple containing its output and a string with human-readable profiling information.

    >>> import time
    >>> out, inf = profile(time.sleep)(.001)
    >>> out
    >>> inf[:10].strip()
    'took 0.0'

Instance Methods | [hide private]
__init__(self, func) | source code
__call__(self, *args) | source code