:py:mod:`pytmosph3r.util.profiling` =================================== .. py:module:: pytmosph3r.util.profiling Module Contents --------------- .. py:function:: profiler(filename: Optional[pathlib.Path] = None) -> cProfile.Profile Profile some part of the code using a context block. .. code-block:: python with profiler() as pr: m = np.random.random((1000,1000)) ** 2 # After the context block, the profile can be accessed. print(pr.stats) :param filename: name of the file where to save the profile :type filename: Optional[Path] :returns: Return the profile of the code previously executed.