Skip to content

Commit

Permalink
Add section on memory profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 2, 2020
1 parent 96fa044 commit d954b0d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/python/performance.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Performance
===========

Profiling
---------
CPU profiling
-------------

For example:

Expand All @@ -11,3 +11,14 @@ For example:
cat packages.json | python -m cProfile -o code.prof ocdskit/cli/__main__.py compile > /dev/null
gprof2dot -f pstats code.prof | dot -Tpng -o output.png
open output.png
Memory profiling
----------------

For example:

.. code:: bash
pip install memory_profiler matplotlib
time mprof run libcoveoc4ids data.json
mprof plot

0 comments on commit d954b0d

Please sign in to comment.