-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Logging Statements for Performance Analysis #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shankari Any suggestions for cleaner ways to instrument the execution of specific sections of code?
My first thought was to create a decorator which records and prints execution time of a function. But this would only work on a per-function basis, and @TeachMeTW thinks that a more granular, per-"Stage" measurement will be necessary.
@TeachMeTW is also wondering if "Time for : x seconds" is adequate or if each of these log statements should include an ISO string.
I thought that logging
already included timestamps – is it just a matter of configuring it to show them?
Why are we only adding the times as logs? We should put them in as stats (e.g. @JGreenlee the canonical way to instrument specific sections of code in python is to use a Timer in a
I would suggest using the same |
@shankari I wanted to clarify; would I be using
also I had a question with the server implementation. The |
This also means that all the |
@shankari Sounds good, I will implement both 1) and 2) on e-mission/e-mission-server#986 |
Description
Introduces logging statements to various functions primarily located in
utils.py
and data page callbacks -- more to be added. The logging format has been standardized to provide clarity and consistency, structured as follows:Format:
[Component] - [Function/Callback Name] - [Stage] - [Details]
Example:
Utils - Trajectories Stage 1 - Execution Time: 150ms
The primary goal of these logging enhancements is to facilitate the identification of performance bottlenecks and to enable the export of timing data for further analysis.
Changes Made
utils.py
.Rationale
By incorporating these logging statements, we aim to:
Testing
Next Steps: