monitoring#

predict_backend.tools.monitoring.cprofile_decorator(enabled=False)#
predict_backend.tools.monitoring.create_monitoring_store()#
predict_backend.tools.monitoring.get_monitoring_store()#
predict_backend.tools.monitoring.time_benchmark(always_enable=False, use_logger=False)#

Decorator function to perform a simple time benchmark of a function and post the results in a parseable format to the logger. The default for this decorator is to do nothing. If always_enable is set to True in the decorator or if enable_time_benchmark is passed as a kwarg to the underlying function being decorated then the benchmark will be calculated. This is done to make it easier to selectively use this benchmark decorator

Parameters:

always_enable (Optional[bool]) – set to True and everytime the wrapped function is called it will calculate a benchmark

Returns:

the return value of the wrapped function

predict_backend.tools.monitoring.write_cprofile_record(pr, measurement_id, extra_args={})#