I'd like to profile a method of a function in Python, using cProfile. I tried the following:
import cProfile as profile
# Inside the class method...
profile.run("self.myMethod()", "output_file")
But it does not work. How can I call a self.method with "run"?
Use the profilehooks decorator