Skip to content

Instantly share code, notes, and snippets.

View fherbine's full-sized avatar
🏠
Working from home

Félix Herbinet fherbine

🏠
Working from home
View GitHub Profile
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)