Skip to main content

memdump

Dump memory statistics.

Will print a sample of all RSS memory samples added by
calling :func:`sample_mem`, and in addition print
used RSS memory after :func:`gc.collect`.
def memdump(
samples: int = 10,
file: file-like object = None
) - > null

Dump memory statistics. Will print a sample of all RSS memory samples added by calling :func:sample_mem, and in addition print used RSS memory after :func:gc.collect.

Parameters

NameTypeDescription
samplesint = 10The maximum number of historical RSS memory samples to display from the collected sample buffer.
filefile-like object = NoneThe file-like object (stream) where the memory statistics will be printed; defaults to sys.stdout if None.

Returns

TypeDescription
nullNothing is returned; output is written to the specified file or stdout.