petitRADTRANS.__debug
=====================

.. py:module:: petitRADTRANS.__debug

.. autoapi-nested-parse::

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



Attributes
----------

.. autoapisummary::

   petitRADTRANS.__debug.__megabyte


Functions
---------

.. autoapisummary::

   petitRADTRANS.__debug.malloc_peak_snapshot
   petitRADTRANS.__debug.malloc_top_lines_snapshot


Module Contents
---------------

.. py:data:: __megabyte
   :value: 1048576


.. py:function:: 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.


.. py:function:: 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.


