pydecorium.decorators.ProfilerUtils#
To create a new profiler utils decorator, refer to the documentation How to create a profiler utils decorator.
- class pydecorium.decorators.ProfilerUtils(*args, **kwargs)[source]#
ProfilerUtils
class is a base class for utils of thepydecorium.decorators.FunctionProfiler
class.The subclasses must implement the following methods:
def pre_execute(func, *args, **kwargs) -> None: pass def post_execute(func, *args, **kwargs) -> None: pass def handle_result(self): pass def string_value(self, result) -> str: pass
The subclasses must contain the following attributes:
- data_name: str
The name of the data collected by the profiler.
Note
The subclasses can also be used as a simple decorator that prints on the console the result.