Everybody loves %timeit
, there’s no doubt about it. So why not have
something like that, but for measuring how much memory your line takes?
Well, now you can; grab a hold of the script in the following gist and
run it like in the example.
[gist id=3022718]
Instead of taking care of the dirty process inspection stuff myself, I
decided to delegate this to Fabian’s simple but very good
[memory_profiler
][]. There is also Guppy available, but its design
seems a bit and overkill for this task.
Please contact me if you find problems with this implementation, this is a preliminary, quick hack-y version. :)
Comments !