Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

@profile is a function decorator, it can be only applied to a function or method. Wrap your code in a function and apply @profile to it, as shown in the examples of https://pypi.python.org/pypi/memory_profiler.