This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cProfile | |
| import threading | |
| def _run_profiler(run): | |
| """Use as a decorator for Thread profiling ONLY""" | |
| def wrapper(self): | |
| profiler = cProfile.Profile() | |
| profiler.enable() | |
| run(self) |
OlderNewer