dubfi.profile_util¶
Profiling and performance monitoring utilities.
Added in version 0.1.0: (initial release)
Functions¶
|
Log duration of wall clock time of function call. |
|
Profile function and save result to file (decorator). |
|
Create daemon thread that logs memory usage. |
|
Log memory usage to log_fn in infinite loop. |
Module Contents¶
- dubfi.profile_util.profile_fnc(fnc, target=None)[source]¶
Profile function and save result to file (decorator).
- dubfi.profile_util.monitor_memory(interval=10, log_fn=log.info)[source]¶
Create daemon thread that logs memory usage.
- Parameters:
interval (float) – logging interval in seconds
log_fn (callable) – output function, can be print or log.info or similar. This function should take one string as argument.
- Return type:
None