mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Adding benchmarking for new frame_election_provider_support (#11149)
* First stab at adding benchmarking for `election-provider-support` onchain * Adding `BoundedPhragMMS` and fixing stuff * Fixing node runtime * Fixing tests * Finalising all benchmarking stuff * better comments * Better benchmarking config * Better `WeightInfo` and benchmarking * Fixing tests * Adding some documentation * Fixing some typos * Incorporating review feedback * cleanup of rustdocs * rustdoc changes * changes after code review * Fixing some errors. * Fixing dependencies post merge * Bringing back `UnboundedExecution` * Better rustdoc and naming * Cargo.toml formatting
This commit is contained in:
@@ -37,7 +37,7 @@ use sp_std::prelude::*;
|
||||
///
|
||||
/// In almost all cases, a balanced solution will have a better score than an unbalanced solution,
|
||||
/// yet this is not 100% guaranteed because the first element of a [`crate::ElectionScore`] does not
|
||||
/// directly related to balancing.
|
||||
/// directly relate to balancing.
|
||||
///
|
||||
/// Note that some reference implementation adopt an approach in which voters are balanced randomly
|
||||
/// per round. To advocate determinism, we don't do this. In each round, all voters are exactly
|
||||
|
||||
@@ -37,7 +37,7 @@ use sp_std::{prelude::*, rc::Rc};
|
||||
/// - The algorithm is a _best-effort_ to elect `to_elect`. If less candidates are provided, less
|
||||
/// winners are returned, without an error.
|
||||
///
|
||||
/// This can only fail of the normalization fails. This can happen if for any of the resulting
|
||||
/// This can only fail if the normalization fails. This can happen if for any of the resulting
|
||||
/// assignments, `assignment.distribution.map(|p| p.deconstruct()).sum()` fails to fit inside
|
||||
/// `UpperOf<P>`. A user of this crate may statically assert that this can never happen and safely
|
||||
/// `expect` this to return `Ok`.
|
||||
|
||||
Reference in New Issue
Block a user