Benchmark Utility Pallet (#5384)

* Move tests

* Move around feature cfgs

* Start benchmarks

* as_multi bench

* finish

* fix tests

* Update frame/utility/src/benchmarking.rs

Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>

* Update Cargo.toml

* fix test

Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>
This commit is contained in:
Shawn Tabrizi
2020-03-31 22:53:21 +02:00
committed by GitHub
parent 63e6f81776
commit 74b008a729
23 changed files with 653 additions and 451 deletions
@@ -16,6 +16,8 @@
//! Treasury pallet benchmarking.
#![cfg(feature = "runtime-benchmarks")]
use super::*;
use frame_system::RawOrigin;
-2
View File
@@ -102,9 +102,7 @@ use frame_support::{weights::{Weight, WeighData, SimpleDispatchInfo}, traits::Co
use codec::{Encode, Decode};
use frame_system::{self as system, ensure_signed, ensure_root};
#[cfg(test)]
mod tests;
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
type BalanceOf<T> = <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
+20
View File
@@ -1,3 +1,23 @@
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Substrate is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! Treasury pallet tests.
#![cfg(test)]
use super::*;
use frame_support::{