Returns the running time of the given function, in seconds.
(function, *args, **kwargs)
| 64 | #### PROFILER ###################################################################################### |
| 65 | |
| 66 | def duration(function, *args, **kwargs): |
| 67 | """ Returns the running time of the given function, in seconds. |
| 68 | """ |
| 69 | t = time() |
| 70 | function(*args, **kwargs) |
| 71 | return time() - t |
| 72 | |
| 73 | def profile(function, *args, **kwargs): |
| 74 | """ Returns the performance statistics (as a string) of the given Python function. |
nothing calls this directly
no test coverage detected
searching dependent graphs…