cars.orchestrator.cluster.log_wrapper ===================================== .. py:module:: cars.orchestrator.cluster.log_wrapper .. autoapi-nested-parse:: Contains functions for wrapper logs Attributes ---------- .. autoapisummary:: cars.orchestrator.cluster.log_wrapper.THREAD_TIMEOUT Classes ------- .. autoapisummary:: cars.orchestrator.cluster.log_wrapper.CarsMemProf Functions --------- .. autoapisummary:: cars.orchestrator.cluster.log_wrapper.log_function cars.orchestrator.cluster.log_wrapper.log_message cars.orchestrator.cluster.log_wrapper.loop_function cars.orchestrator.cluster.log_wrapper.get_current_memory cars.orchestrator.cluster.log_wrapper.log_delta_memory cars.orchestrator.cluster.log_wrapper.exception_safe cars.orchestrator.cluster.log_wrapper.generate_summary cars.orchestrator.cluster.log_wrapper.generate_pdf_profiling cars.orchestrator.cluster.log_wrapper.filter_lists cars.orchestrator.cluster.log_wrapper.generate_boxplot cars.orchestrator.cluster.log_wrapper.generate_histo cars.orchestrator.cluster.log_wrapper.generate_pie_chart cars.orchestrator.cluster.log_wrapper.cars_profile Module Contents --------------- .. py:data:: THREAD_TIMEOUT :value: 2 .. py:function:: log_function(*argv, **kwargs) Create a wrapper for function running it :param argv: args of func :param kwargs: kwargs of func :return: path to results .. py:function:: log_message(func, message) log profiling message :param func : logged function :param message : log message .. py:function:: loop_function(argv, kwargs, func, nb_iteration=5) generate a loop on each cluster function to eval possible leak :param argv : input argv :param kwargs : input kwargs :param func : function to evaluation :param nb_iteration (int, optional): number of the iteration loop. :param Defaults to 5. Returns: _type_: result of the function .. py:function:: get_current_memory() Get current memory of process :return: memory :rtype: float .. py:function:: log_delta_memory(func, memory_start, memory_end) Log memory infos :param func: profiled function :param memory_start: memory before the run of function :type memory_start: float :param memory_end: memory after the run of function :type memory_end: float .. py:function:: exception_safe(func) Decorator for consistent exception handling in profiling functions :param func: function to wrap :return: wrapped function .. py:function:: generate_summary(out_dir, used_conf, pipeline_name, clean_worker_logs=False) Generate Profiling summary .. py:function:: generate_pdf_profiling(log_dir) Generate PDF profiling summary for all res .. py:function:: filter_lists(names, data, cond) Filter lists with condition on name .. py:function:: generate_boxplot(axis, names, data_full, title, data_type) Generate boxplot .. py:function:: generate_histo(axis, names, data, title, data_type, data_min_err=None, data_max_err=None) Generate histogram .. py:function:: generate_pie_chart(axis, names, data, title) Generate pie chart, data in % .. py:function:: cars_profile(name=None, interval=0.1) CARS profiling decorator :param: func: function to monitor .. py:class:: CarsMemProf(pid, pipe, interval=0.1) Bases: :py:obj:`threading.Thread` CarsMemProf Profiling thread .. py:attribute:: pipe .. py:attribute:: interval :value: 0.1 .. py:attribute:: cpu_interval :value: 0.1 .. py:attribute:: process .. py:method:: run() Run