-
Notifications
You must be signed in to change notification settings - Fork 331
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
Benchmark compute-budget instructions #3614
Benchmark compute-budget instructions #3614
Conversation
programs/compute-budget/Cargo.toml
Outdated
[dev-dependencies] | ||
criterion = { workspace = true } | ||
solana-compute-budget = { workspace = true } | ||
solana-runtime-transaction = { workspace = true } |
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.
dev-dependent on solana-runtime-transaction
for bencher to access process_compute_budget_instructions ()
to process instructions, caused circular dep. Because:
solana-runtime-transaction
dep onsolana-builtins-default-costs
crate to accessMAYBE_BUILTIN_KEY
static map;solana-builtins-default-costs
dep onsolana-compute-budget-program
(this) crate, in order to getcompute_budget::id()
Commonly we can solve this by creating a separate bench-compute-budget-program
crate alone side this crate, but that'd break "structure" set up so far. Foreseeing similar situation might exist for other programs, maybe we adapt this change for all bench projects? (eg instead creating benches\
within target crate, creating bench-xyz-program
crate next to it) Or perhaps there are more elegant solution?
5b5b8a3
to
2e1711a
Compare
@@ -0,0 +1,24 @@ | |||
[package] | |||
name = "solana-compute-budget-program-bench" | |||
publish = false |
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.
unpublished
./cargo nightly bench --manifest-path programs/compute-budget-bench/Cargo.toml
|
Problem
Part of #3364, to benchmark each
compute-budget
instructions to determine their static CU consumption.Summary of Changes
add benches for each instruction, aiming to run through their happy-path.
Fixes #