Closed petered closed 5 years ago
N.B. you don't actually have to import and instantiate LineProfiler in your own code to test. That's what the kernprof script is for --- it injects the object into your code as it runs, so the only modification to your own code you need to do is decorate the functions you want to profile.
Wasn't immediately obvious how to use this nice tool (had to look into tests to see how it's used). I propose a more complete python example.