Benchmark Treasury Pallet (#5287)

* Start benchmarks

* try_origin or root

* More benches

* stuck

* Custom trait functions for benchmarks

* finish benchmarks

* Bump impl

* More comments

* Bump spec

* Remove import

* Update frame/elections-phragmen/src/lib.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* Update frame/support/src/traits.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* Fix merge

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Shawn Tabrizi
2020-03-20 15:08:16 +01:00
committed by GitHub
parent a9b9ca5fa8
commit ca3cbbfc14
11 changed files with 715 additions and 460 deletions
+7
View File
@@ -171,6 +171,13 @@ pub trait Contains<T: Ord> {
/// Get the number of items in the set.
fn count() -> usize { Self::sorted_members().len() }
/// Add an item that would satisfy `contains`. It does not make sure any other
/// state is correctly maintained or generated.
///
/// **Should be used for benchmarking only!!!**
#[cfg(feature = "runtime-benchmarks")]
fn add(t: &T);
}
/// Determiner to say whether a given account is unused.