Move phragmen benchmarks out of Staking (#3588)

* Move phragmen benches to.. phragmen.

* Move some basic phragmen tests to.. phragmen.

* Line-width

* Add phragmen equ implementation as flot

* Add phragmen equ implementation as flot

* Add mock and test file.
This commit is contained in:
Kian Paimani
2019-09-13 08:41:33 +02:00
committed by GitHub
parent 7b87cd206b
commit a6b5d1d155
10 changed files with 661 additions and 374 deletions
+2 -10
View File
@@ -243,22 +243,14 @@
#![recursion_limit="128"]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(all(feature = "bench", test), feature(test))]
#[cfg(all(feature = "bench", test))]
extern crate test;
#[cfg(any(feature = "bench", test))]
#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;
pub mod inflation;
#[cfg(all(feature = "bench", test))]
mod benches;
use rstd::{prelude::*, result};
use codec::{HasCompact, Encode, Decode};
use support::{
@@ -1295,7 +1287,7 @@ impl<T: Trait> Module<T> {
if cfg!(feature = "equalize") {
let tolerance = 0_u128;
let iterations = 2_usize;
equalize::<_, _, T::CurrencyToVote, _>(
equalize::<_, _, _, T::CurrencyToVote>(
assignments,
&mut supports,
tolerance,