-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Execution layer reports timings of each executed command #20923
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
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.
Nice! Thanks for this! just nits
Success(Duration), | ||
Abort(Duration), |
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.
does Success
and Abort
not already duplicate information contained in effects? maybe this is the most expedient way, but at least wanted to ask if there's a way to not duplicate that here
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 think it is easy to figure out which command aborted by looking at the effects, although it may be possible.
metrics, | ||
enable_expensive_checks, | ||
certificate_deny_set, | ||
); |
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.
maybe add a short comment on these explaining that we're deliberately leaving timings empty for old versions?
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.
done
crates/sui-types/src/execution.rs
Outdated
Success(Duration), | ||
Abort(Duration), | ||
} | ||
pub type TimingResult<R, E> = Result<(R, Vec<ExecutionTiming>), (E, Vec<ExecutionTiming>)>; |
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.
nit - this name makes it sounds like the main output of the result is the timing, maybe ResultWithTiming
?
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.
done
@@ -281,6 +284,7 @@ mod checked { | |||
) -> ( | |||
GasCostSummary, | |||
Result<Mode::ExecutionResults, ExecutionError>, |
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.
any plan to change this to TimingResult
(or ResultWithTiming
) eventually? or if not why not?
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.
They have to be split apart at some point, and this seemed like the most convenient point. I originally tried to keep them separate throughout the stack, but changing anything that returns Result
to (Result, T)
is very ugly - ?
stops working. Since this function already doesn't return a naked result it was easy to do the split here.
c1e8493
to
23ef2af
Compare
e8df0c5
to
1cb1fa7
Compare
The timings are unused for now - they are intended for the congestion control execution time estimator.