.. _f-eventprofiler: module ``profiling.event_profiler`` =================================== .. inheritance-diagram:: cpyquickhelper.profiling.event_profiler Short summary +++++++++++++ module ``cpyquickhelper.profiling.event_profiler`` Profiling class. :githublink:`%|py|0` Classes +++++++ +------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +==========================================================================================+==========================================================================================================================================+ | :class:`EventProfiler ` | This profiler profiles both memory and function calls. It stores events and produces a timeline. See :ref:`l-example-event-profling` ... | +------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`EventProfilerDebug ` | One class to measure time wasted by profiling. | +------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`WithEventProfiler ` | Enables profiling with the following syntax: | +------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +==========================================================================================+=============================================================================================================================+ | :meth:`n_columns ` | Returns the number of stored informations by the profiler in memory. This corresponds to the number of columns returned ... | +------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :meth:`n_columns ` | Returns the number of stored informations by the profiler in memory. This corresponds to the number of columns returned ... | +------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :meth:`report ` | Returns the profiling report as a dataframe. | +------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +================================================================================================================+========================================================================================================================+ | :py:meth:`__enter__ ` | | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__exit__ ` | | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_choose ` | Returns a string which represents the called function. When the function is built-in, frame contains the function ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_choose ` | Returns a string which represents the called function. When the function is built-in, frame contains the function ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_choose_mod ` | Returns a string which represents the module of the called function. When the function is built-in, frame contains ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_choose_mod ` | Returns a string which represents the module of the called function. When the function is built-in, frame contains ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_empty_cache ` | Empties the cache. This function logs a couple of events. The cache must contains enough place to log them. ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_empty_cache ` | Empties the cache. This function logs a couple of events. The cache must contains enough place to log them. ... | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_restore_profiler ` | This relies on :func:`sys.setprofile` and :func:`sys.getprofile`. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_restore_profiler ` | This relies on :func:`sys.setprofile` and :func:`sys.getprofile`. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_setup_profiler ` | This relies on :func:`sys.setprofile` and :func:`sys.getprofile`. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_setup_profiler ` | This relies on :func:`sys.setprofile` and :func:`sys.getprofile`. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`log_event ` | Logs an event in the database. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`log_event ` | Logs an event in the database. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`retrieve_raw_results ` | Retrieves the raw results. Difficult to interpret. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`retrieve_raw_results ` | Retrieves the raw results. Difficult to interpret. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`retrieve_results ` | Retrieves the raw results. Difficult to interpret. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`retrieve_results ` | Retrieves the raw results. Difficult to interpret. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`start ` | Starts the profiling. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`start ` | Starts the profiling without enabling it. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`stop ` | Stops the profiling. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`stop ` | Stops the unstarted profiling. | +----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: cpyquickhelper.profiling.event_profiler :members: :special-members: __init__ :show-inheritance: