Skip to content

Commit 18dccd1

Browse files
committed
Warn about memory_profiler/mprof interplay
This took me time to track down - running memory_profiler in a script run via mprof will prevent the function timings being recorded & plotted on the graph.
1 parent 0e53367 commit 18dccd1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ afterward will plot the result, making plots (using matplotlib) similar to these
143143

144144
A discussion of these capabilities can be found `here <http://fa.bianp.net/blog/2014/plot-memory-usage-as-a-function-of-time/>`_.
145145

146+
.. warning:: If your Python file imports the memory profiler `from memory_profiler import profile` these timestamps will not be recorded. Comment out the import, leave your functions decorated, and re-run.
147+
146148
The available commands for `mprof` are:
147149

148150
- ``mprof run``: running an executable, recording memory usage

0 commit comments

Comments
 (0)