1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
====================================
``celery.utils.debug``
====================================
.. contents::
:local:
Sampling Memory Usage
=====================
This module can be used to diagnose and sample the memory usage
used by parts of your application.
For example, to sample the memory usage of calling tasks you can do this:
.. code-block:: python
from celery.utils.debug import sample_mem, memdump
from tasks import add
try:
for i in range(100):
for j in range(100):
add.delay(i, j)
sample_mem()
finally:
memdump()
API Reference
=============
.. currentmodule:: celery.utils.debug
.. automodule:: celery.utils.debug
.. autofunction:: sample_mem
.. autofunction:: memdump
.. autofunction:: sample
.. autofunction:: mem_rss
.. autofunction:: ps
|