Skip to content

Commit

Permalink
chore(nns): Fix benchmark test (#2813)
Browse files Browse the repository at this point in the history
A last minute change to NeuronBuilder caused the benchmark to be
incorrectly constructed. This adds the field `
neuron.recent_ballots_next_entry_index = Some(0);` to the neurons so
that the typical migration is not performed.
  • Loading branch information
max-dfinity authored Nov 26, 2024
1 parent d11cedb commit 9f168dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
38 changes: 19 additions & 19 deletions rs/nns/governance/canbench/canbench_results.yml
Original file line number Diff line number Diff line change
@@ -1,115 +1,115 @@
benches:
add_neuron_active_maximum:
total:
instructions: 36149096
instructions: 36185720
heap_increase: 1
stable_memory_increase: 0
scopes: {}
add_neuron_active_typical:
total:
instructions: 1834158
instructions: 1835678
heap_increase: 0
stable_memory_increase: 0
scopes: {}
add_neuron_inactive_maximum:
total:
instructions: 96285952
instructions: 96172531
heap_increase: 1
stable_memory_increase: 0
scopes: {}
add_neuron_inactive_typical:
total:
instructions: 7381170
instructions: 7370935
heap_increase: 0
stable_memory_increase: 0
scopes: {}
cascading_vote_all_heap:
total:
instructions: 31887311
instructions: 31928362
heap_increase: 0
stable_memory_increase: 0
scopes: {}
cascading_vote_heap_neurons_stable_index:
total:
instructions: 54233977
instructions: 54231599
heap_increase: 0
stable_memory_increase: 0
scopes: {}
cascading_vote_stable_everything:
total:
instructions: 160313292
instructions: 160353265
heap_increase: 0
stable_memory_increase: 0
scopes: {}
cascading_vote_stable_neurons_with_heap_index:
total:
instructions: 138075846
instructions: 138159263
heap_increase: 0
stable_memory_increase: 0
scopes: {}
centralized_following_all_stable:
total:
instructions: 66264382
instructions: 66001085
heap_increase: 0
stable_memory_increase: 0
scopes: {}
compute_ballots_for_new_proposal_with_stable_neurons:
total:
instructions: 1690958
instructions: 1782808
heap_increase: 0
stable_memory_increase: 0
scopes: {}
list_neurons_ready_to_unstake_maturity_heap:
total:
instructions: 3441869
instructions: 470604
heap_increase: 0
stable_memory_increase: 0
scopes: {}
list_neurons_ready_to_unstake_maturity_stable:
total:
instructions: 710546759
instructions: 712702017
heap_increase: 0
stable_memory_increase: 0
scopes: {}
list_ready_to_spawn_neuron_ids_heap:
total:
instructions: 3438794
instructions: 462676
heap_increase: 0
stable_memory_increase: 0
scopes: {}
list_ready_to_spawn_neuron_ids_stable:
total:
instructions: 710543948
instructions: 712693035
heap_increase: 0
stable_memory_increase: 0
scopes: {}
neuron_metrics_calculation_heap:
total:
instructions: 837546
instructions: 528806
heap_increase: 0
stable_memory_increase: 0
scopes: {}
neuron_metrics_calculation_stable:
total:
instructions: 1843015
instructions: 1817353
heap_increase: 0
stable_memory_increase: 0
scopes: {}
range_neurons_performance:
total:
instructions: 47360359
instructions: 47337873
heap_increase: 0
stable_memory_increase: 0
scopes: {}
single_vote_all_stable:
total:
instructions: 364240
instructions: 363904
heap_increase: 0
stable_memory_increase: 0
scopes: {}
update_recent_ballots_stable_memory:
total:
instructions: 236573
instructions: 13388351
heap_increase: 0
stable_memory_increase: 0
scopes: {}
Expand Down
1 change: 1 addition & 0 deletions rs/nns/governance/src/governance/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ fn make_neuron(
vote: Vote::Yes as i32,
})
.collect();
neuron.recent_ballots_next_entry_index = Some(0);

neuron
}
Expand Down

0 comments on commit 9f168dd

Please sign in to comment.