quarnster wrote:cProfile is great if you have a deep call stack though as it separates the time taken for each method called.
Just rename your current "run" method to "run_real" and create a new run method that does cProfile.run("self.run_real(whatever)", locals(), globals()) or similar.
def run(self, edit, numbers):
cProfile.run("self.real_run(edit, numbers)", locals(), globals())
quarnster wrote:Apologies, use cProfile.runctx rather than "run"
Users browsing this forum: No registered users and 23 guests