revrt.utilities.monitoring.log_runtime#

log_runtime(message, log_level=20)[source]#

Log the time taken to run a block of code

Parameters:
  • message (str) – Message to log with the time taken. The time taken will be appended to this message.

  • log_level (int, default "INFO") – Logging level to use for the message. By default, logging.INFO.

  • hours (bool, default False) – If True, log time in hours instead of minutes. By default, False.