petitRADTRANS.__debug#

Store debug functions. Not to be used in released or committed codes.

Attributes#

Functions#

malloc_peak_snapshot(→ None)

Display the traced memory and the peak memory since tracemalloc.start() in MiB.

malloc_top_lines_snapshot(→ None)

Display the top lines in terms of memory usage, in MiB.

Module Contents#

petitRADTRANS.__debug.__megabyte = 1048576#
petitRADTRANS.__debug.malloc_peak_snapshot(label: str = '', reset_peak: bool = True) None#

Display the traced memory and the peak memory since tracemalloc.start() in MiB.

Args:

label: label to be printed next to the display. reset_peak: if True, the memory peak will be reset.

petitRADTRANS.__debug.malloc_top_lines_snapshot(label: str = '', n_lines: int = 3) None#

Display the top lines in terms of memory usage, in MiB.

Args:

label: label to be printed next to the display. n_lines: number of lines to show.