2

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.

bewithaman
  • 748
  • 8
  • 16

1 Answers1

2

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.

Community
  • 1
  • 1
Mike Dunlavey
  • 39,349
  • 13
  • 88
  • 132