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
| Name | Type | Description |
|---|---|---|
| samples | int = 10 | The maximum number of historical RSS memory samples to display from the collected sample buffer. |
| file | file-like object = None | The file-like object (stream) where the memory statistics will be printed; defaults to sys.stdout if None. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; output is written to the specified file or stdout. |