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

CU for VoteInstruction::InitializeAccount #4342

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

ksolana
Copy link

@ksolana ksolana commented Jan 8, 2025

Problem

Part of #3364

$ cargo +nightly bench --bench vote_instructions

    Finished `bench` profile [optimized] target(s) in 0.47s
     Running benches/vote_instructions.rs (/home/sol/src/agave/target/release/deps/vote_instructions-4f954f25ea9aea56)
Gnuplot not found, using plotters backend
Benchmarking vote_instruction_initialize_account: Collecting 100 samples in estimated 5.0920 
vote_instruction_initialize_account
                        time:   [18.559 µs 18.580 µs 18.606 µs]
                        change: [-44.503% -44.117% -43.657%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  2 (2.00%) high mild
  8 (8.00%) high severe

Benchmarking vote_instruction_authorize: Collecting 100 samples in estimated 5.0854 s (273k i
vote_instruction_authorize
                        time:   [18.356 µs 18.425 µs 18.485 µs]
                        change: [+2.2509% +2.7272% +3.1463%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) low severe
  3 (3.00%) high mild
  5 (5.00%) high severe

@ksolana
Copy link
Author

ksolana commented Jan 8, 2025

Getting an error with cargo bench:

Err(Error { request: Some(GetMinimumBalanceForRentExemption), kind: Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(8899), path: "/", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })) }) })

cli/benches/vote.rs Outdated Show resolved Hide resolved
@ksolana ksolana force-pushed the vote_cu branch 2 times, most recently from 7a69d37 to 6da5204 Compare January 18, 2025 16:28
@ksolana ksolana marked this pull request as ready for review January 18, 2025 16:29
@ksolana ksolana changed the title [WIP] Vote cu CU for VoteInstruction::InitializeAccount Jan 18, 2025
@ksolana ksolana force-pushed the vote_cu branch 3 times, most recently from 0f025d7 to 7dd6873 Compare January 20, 2025 19:05
cli/benches/vote.rs Outdated Show resolved Hide resolved
cli/benches/vote.rs Outdated Show resolved Hide resolved
cli/benches/vote.rs Outdated Show resolved Hide resolved
programs/vote/benches/cu_vote.rs Outdated Show resolved Hide resolved
});
}

criterion_group!(benches, bench_initialize_account, bench_authorize);

Choose a reason for hiding this comment

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

vote has 16-ish instructions (here: https://github.com/anza-xyz/agave/blob/master/sdk/vote-interface/src/instruction.rs#L27), will benches for the rest of them being added here?

Copy link
Author

Choose a reason for hiding this comment

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

yes.

programs/vote/benches/cu_vote.rs Outdated Show resolved Hide resolved
KirillLykov
KirillLykov previously approved these changes Jan 23, 2025
@ksolana ksolana merged commit 981c4c1 into anza-xyz:master Jan 24, 2025
58 checks passed
@ksolana ksolana deleted the vote_cu branch January 26, 2025 19:32
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