-
Notifications
You must be signed in to change notification settings - Fork 10.5k
build.ps1: make time summary hierarchical #84360
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
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.
I don't really understand the self-time vs total time. I get that an interior node will need a view of the summation of the sub-times, but why is the self-time useful there? That is, why not just have a singular value? What does the second timing give us?
Makes it obvious what we're not capturing elsewhere. For example, it's clear that |
I think that we should try to keep this simple for now. The additional complexity can be added when needed. |
Done |
@swift-ci please smoke test |
Currently, summary timings are emitted at the end of operations. Each operation that needs to be timed has to instantiate a stopwatch when it begins, and writes the time provided by the stopwatch when it ends. This can cause nested operations to double-count elapsed time.
This change introduces two functional changes:
To allow for this, we need to track the operation from the beginning instead of just reporting at the end. Any block of code can now be timed by wrapping it in a
Record-OperationTime
call.