MCPcopy
hub / github.com/celery/celery / ps

Function ps

celery/utils/debug.py:145–154  ·  view source on GitHub ↗

Return the global :class:`psutil.Process` instance. Note: Returns :const:`None` if :pypi:`psutil` is not installed.

()

Source from the content-addressed store, hash-verified

143
144
145def ps(): # pragma: no cover
146 """Return the global :class:`psutil.Process` instance.
147
148 Note:
149 Returns :const:`None` if :pypi:`psutil` is not installed.
150 """
151 global _process
152 if _process is None and Process is not None:
153 _process = Process(os.getpid())
154 return _process
155
156
157def _process_memory_info(process):

Callers 3

test_mem_rssFunction · 0.85
memdumpFunction · 0.85
mem_rssFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_mem_rssFunction · 0.68