Closed claalmve closed 7 months ago
Since this is only for developers for now, please consider using hidden functions, and even moving the code to a separate place.
The description and intended use of the tool would be more helpful if they are documented in a place the developers can access more easily. Limitations would be helpful to note as well.
Description of PR
Creating a comprehensive logger for developers to view what is going on in the AE library. This PR allows developers to wrap functions within modules with a
log
function, which prints the runtime of the function and all the sub-functions of the function that exist within the same module. It additionally will log any other sub-modules reference within the current module (i.e. if you try to log DataInterface, it will also log functions within the DataParameters class).Summary of changes and related issue Addition of a library-facing logger in
climakitae.util.logging
to increase visibility of function execution and runtimes in the codebase.Relevant motivation and context This has been developed because it increases the visibility of what functions run at execution (good for tracking logic of the codebase, esp. useful for new developers), and demonstrates the run-time of all sub-functions being run within that module.
Example of its usage is below:
(similar to showing the call stack of a function, but also shows the runtimes).
Type of change
How Has This Been Tested?
Checklist: