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

Fail when running the token-accounts-by-owner benchmark suite without supplying --mint #3964

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

steveluscher
Copy link

Problem

Forget to supply the --mint argument when running the token-accounts-by-owner benchmark?

sol@dev-luscher-dallas-1:~/src/agave/accounts-cluster-bench$ cargo run -- --identity ~/.config/solana/id.json --rpc-bench token-accounts-by-owner --rpc-bench slot --iterations 0 --url l 
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.57s
     Running `/home/sol/src/agave/target/debug/solana-accounts-cluster-bench --identity /home/sol/.config/solana/id.json --rpc-bench token-accounts-by-owner --rpc-bench slot --iterations 0 --url l`
error: The following required arguments were not provided:

USAGE:
    solana-accounts-cluster-bench --config <FILEPATH> --identity <FILE>... --iterations <NUM_ITERATIONS> --url <URL_OR_MONIKER> --mint <MINT_ADDRESS> --rpc-bench <RPC_BENCH_TYPE(S)>...

For more information try --help

Summary of Changes

Enforce that --mint is supplied when token-accounts-by-owner is set.

@@ -939,6 +939,9 @@ fn main() {
.takes_value(true)
.value_name("RPC_BENCH_TYPE(S)")
.multiple(true)
.requires_ifs(&[
("token-accounts-by-owner", "mint"),
Copy link
Author

Choose a reason for hiding this comment

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

It's an array, because we're going to add token-accounts-by-delegate in a separate PR.

@steveluscher steveluscher added the automerge automerge Merge this Pull Request automatically once CI passes label Dec 6, 2024
Copy link

mergify bot commented Dec 6, 2024

automerge label removed due to a CI failure

@mergify mergify bot removed the automerge automerge Merge this Pull Request automatically once CI passes label Dec 6, 2024
@steveluscher steveluscher force-pushed the require-mint-argument branch from 21ba5fe to 02d559e Compare December 6, 2024 00:45
@steveluscher steveluscher force-pushed the require-mint-argument branch from 02d559e to 436943f Compare December 6, 2024 06:36
@steveluscher steveluscher merged commit 2325a5a into anza-xyz:master Dec 7, 2024
40 checks passed
@steveluscher steveluscher deleted the require-mint-argument branch December 7, 2024 06:44
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.

3 participants