bewithaman
bewithaman

Reputation: 778

Profiling of function with small execution time using %prun

How can I do the profiling of functions in python which have very low execution time? I am getting 0 in most of the functions.

Upvotes: 2

Views: 298

Answers (1)

Mike Dunlavey
Mike Dunlavey

Reputation: 40669

Put a loop around it to run it some large number of times, like 10^6, so it takes at least several seconds.

Then the method I use to see how time is spent is this.

Upvotes: 2

Related Questions