Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces NNS vote cascading benchmarks and supporting tests to the repository.
- Adds unit tests for
calculate_cascaded_votescovering various followee configurations and both storage backends. - Implements benchmark setup strategies (Centralized, SingleVote, Chain) with numerous
#[bench]functions to measure performance. - Updates project configuration (
Cargo.toml,canbench.yml) and adds a main binary entry point for NNS benchmarks.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| benchmarks/nns/src/nns_vote_cascading/tests.rs | Added unit tests for vote cascading with Stable/Heap stores |
| benchmarks/nns/src/nns_vote_cascading/benches.rs | Defined benchmark setup strategies and registered benches |
| benchmarks/nns/src/nns_vote_cascading.rs | Implemented Vote, NeuronStore trait, stores, and logic |
| benchmarks/nns/src/main.rs | Added empty main to register NNS benchmark binary |
| benchmarks/nns/canbench_results.yml | Committed initial benchmark results |
| benchmarks/nns/canbench.yml | Added Canbench build and path configurations |
| benchmarks/Cargo.toml | Registered new nns binary for benchmarks |
Comments suppressed due to low confidence (2)
benchmarks/nns/src/nns_vote_cascading/benches.rs:27
- The parameter name 'stratygy' is misspelled; consider renaming it to 'strategy' for clarity.
stratygy: SetUpStrategy,
benchmarks/nns/src/nns_vote_cascading/benches.rs:160
- The parameter name 'stratygy' is misspelled here as well; update it to 'strategy' to match standard spelling.
fn bench_helper(neuron_store: &mut impl NeuronStore, stratygy: SetUpStrategy) -> BenchResult {
|
|
|
|
|
berestovskyy
left a comment
There was a problem hiding this comment.
Looks good, thanks! Would be nice to also have a Jira reference.
This PR re-enables `nns` benchmark in the CI. This is a follow-up PR after #371.
This PR adds NNS related benchmarks.
Based on this code.
NNS benchmarks will be enabled in CI in follow-up PR, because they need to be present in
mainbranch first.