Skip to content
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

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

mystenmark
Copy link
Contributor

The timings are unused for now - they are intended for the congestion control execution time estimator.

@mystenmark mystenmark requested review from aschran and tzakian January 18, 2025 19:43
Copy link

vercel bot commented Jan 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 2:03am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 2:03am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 2:03am

@mystenmark mystenmark temporarily deployed to sui-typescript-aws-kms-test-env January 18, 2025 19:44 — with GitHub Actions Inactive
Copy link
Contributor

@aschran aschran left a 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

Comment on lines +175 to +176
Success(Duration),
Abort(Duration),
Copy link
Contributor

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

Copy link
Contributor Author

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,
);
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Success(Duration),
Abort(Duration),
}
pub type TimingResult<R, E> = Result<(R, Vec<ExecutionTiming>), (E, Vec<ExecutionTiming>)>;
Copy link
Contributor

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?

Copy link
Contributor Author

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>,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@mystenmark mystenmark temporarily deployed to sui-typescript-aws-kms-test-env January 24, 2025 02:02 — with GitHub Actions Inactive
@mystenmark mystenmark merged commit 6210d3b into main Jan 24, 2025
51 checks passed
@mystenmark mystenmark deleted the mlogan-cc-estimator branch January 24, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants