hibou.utils.timer#

hibou.utils.timer(func: Callable)#

A decorator that puts in the logs the execution time of the given function.

Examples#

A small example can be:

import logging
from hibou import utils

# logging configuration
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)

@utils.timer
def my_func():
    return 0