-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(nns): Change from benchmarking listing neurons for unstake matur…
…ity to benchmarking the entire unstake maturity operation (#4183) # Why When trying to unstake maturity, not only the listing steps are computationally intensive, the actual unstaking is too, because it calls `with_neuron_mut` in a loop. We should cap the number of neurons to unstake in a single message, and this benchmark prepares for the improvement. # What * Refactor the `Governance::unstake_maturity_of_dissolved_neurons` to `NeuronStore::unstake_maturity_of_dissolved_neurons` since only neuron store is involved for this operation. * Change benchmark from `list_neurons_ready_to_unstake_maturity` to `unstake_maturity_of_dissolved_neurons` * Add bench scopes for listing and unstaking, since the former is linear to # of neurons and the latter depends on the available number of neurons to unstake maturity (and those 2 numbers don't have a reasonable ratio that we can assume) * Update bench results
- Loading branch information
1 parent
38618cf
commit 55dcbc7
Showing
5 changed files
with
79 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters