High-perfomance logging profiler, mostly written in C.
||Methods defined here:|
- __init__(self, logfn, lineevents=0, linetimings=1)
- addinfo(self, key, value)
- Add an arbitrary labelled value to the profile log.
- Close the logfile and terminate the profiler.
- Return the file descriptor of the profiler's log file.
- run(self, cmd)
- Profile an exec-compatible string in the script
The globals from the __main__ module are used as both the
globals and locals for the script.
- runcall(self, func, *args, **kw)
- Profile a single call of a callable.
Additional positional and keyword arguments may be passed
along; the result of the call is returned, and exceptions are
allowed to propogate cleanly, while ensuring that profiling is
disabled on the way out.
- runctx(self, cmd, globals, locals)
- Evaluate an exec-compatible string in a specific
The string is compiled before profiling begins.
- Start the profiler.
- Stop the profiler.