Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Weights from benchmark machine #56

Merged
merged 10 commits into from
May 31, 2021
15 changes: 15 additions & 0 deletions file_header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Statemint 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.

// Statemint 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 Statemint. If not, see <http://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion pallets/collator-selection/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ benchmarks! {

T::Currency::make_free_balance_be(
&<CollatorSelection<T>>::account_id(),
T::Currency::minimum_balance() * 2u32.into(),
T::Currency::minimum_balance() * 4u32.into(),
);
let author = account("author", 0, SEED);
assert!(T::Currency::free_balance(&author) == 0u32.into());
Expand Down
68 changes: 34 additions & 34 deletions pallets/collator-selection/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,46 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn set_invulnerables(b: u32, ) -> Weight {
(28_060_000 as Weight)
// Standard Error: 1_000
.saturating_add((118_000 as Weight).saturating_mul(b as Weight))
(17_787_000 as Weight)
// Standard Error: 0
.saturating_add((67_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_desired_candidates() -> Weight {
(25_000_000 as Weight)
(15_632_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_candidacy_bond() -> Weight {
(25_000_000 as Weight)
(15_926_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn register_as_candidate(c: u32, ) -> Weight {
(82_496_000 as Weight)
(69_356_000 as Weight)
// Standard Error: 1_000
.saturating_add((266_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add((226_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn leave_intent(c: u32, ) -> Weight {
(65_836_000 as Weight)
// Standard Error: 2_000
.saturating_add((273_000 as Weight).saturating_mul(c as Weight))
(49_005_000 as Weight)
// Standard Error: 0
.saturating_add((204_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn note_author(c: u32, ) -> Weight {
(108_730_000 as Weight)
// Standard Error: 3_000
.saturating_add((286_000 as Weight).saturating_mul(c as Weight))
(85_728_000 as Weight)
// Standard Error: 2_000
.saturating_add((234_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn new_session(r: u32, c: u32, ) -> Weight {
(50_005_000 as Weight)
(61_183_000 as Weight)
// Standard Error: 2_000
.saturating_add((8_000 as Weight).saturating_mul(r as Weight))
.saturating_add((36_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 2_000
.saturating_add((291_000 as Weight).saturating_mul(c as Weight))
.saturating_add((317_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand All @@ -85,46 +85,46 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
fn set_invulnerables(b: u32, ) -> Weight {
(28_060_000 as Weight)
// Standard Error: 1_000
.saturating_add((118_000 as Weight).saturating_mul(b as Weight))
(17_787_000 as Weight)
// Standard Error: 0
.saturating_add((67_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn set_desired_candidates() -> Weight {
(25_000_000 as Weight)
(15_632_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn set_candidacy_bond() -> Weight {
(25_000_000 as Weight)
(15_926_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn register_as_candidate(c: u32, ) -> Weight {
(82_496_000 as Weight)
(69_356_000 as Weight)
// Standard Error: 1_000
.saturating_add((266_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add((226_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn leave_intent(c: u32, ) -> Weight {
(65_836_000 as Weight)
// Standard Error: 2_000
.saturating_add((273_000 as Weight).saturating_mul(c as Weight))
(49_005_000 as Weight)
// Standard Error: 0
.saturating_add((204_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn note_author(c: u32, ) -> Weight {
(108_730_000 as Weight)
// Standard Error: 3_000
.saturating_add((286_000 as Weight).saturating_mul(c as Weight))
(85_728_000 as Weight)
// Standard Error: 2_000
.saturating_add((234_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
fn new_session(r: u32, c: u32, ) -> Weight {
(50_005_000 as Weight)
(61_183_000 as Weight)
// Standard Error: 2_000
.saturating_add((8_000 as Weight).saturating_mul(r as Weight))
.saturating_add((36_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 2_000
.saturating_add((291_000 as Weight).saturating_mul(c as Weight))
.saturating_add((317_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
Expand Down
95 changes: 56 additions & 39 deletions runtime/statemine/src/weights/pallet_assets.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Statemint 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.

// Statemint 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 Statemint. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for pallet_assets
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-04-21, STEPS: `[20, ]`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 128
//! DATE: 2021-05-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 128

// Executed Command:
// ./target/release/statemint
// benchmark
// --chain
// statemint-dev
// statemine-dev
// --execution
// wasm
// --wasm-execution
Expand All @@ -19,12 +34,14 @@
// --extrinsic
// *
// --steps
// 20
// 50
// --repeat
// 10
// 20
// --raw
// --heap-pages=4096
// --header=./file_header.txt
// --output
// ./
// ./runtime/statemine/src/weights/


#![allow(unused_parens)]
Expand All @@ -37,21 +54,23 @@ use sp_std::marker::PhantomData;
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
fn create() -> Weight {
(68_000_000 as Weight)
(43_742_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_create() -> Weight {
(34_000_000 as Weight)
(23_309_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 440_000
.saturating_add((33_246_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 440_000
.saturating_add((47_556_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 47_000
.saturating_add((21_171_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 47_000
.saturating_add((28_477_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 473_000
.saturating_add((1_756_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
Expand All @@ -61,108 +80,106 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
}
fn mint() -> Weight {
(103_000_000 as Weight)
(56_715_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn burn() -> Weight {
(115_000_000 as Weight)
(63_725_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn transfer() -> Weight {
(153_000_000 as Weight)
(84_592_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn transfer_keep_alive() -> Weight {
(124_000_000 as Weight)
(71_222_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn force_transfer() -> Weight {
(145_000_000 as Weight)
(84_798_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn freeze() -> Weight {
(49_000_000 as Weight)
(31_765_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn thaw() -> Weight {
(47_000_000 as Weight)
(31_061_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn freeze_asset() -> Weight {
(34_000_000 as Weight)
(22_141_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn thaw_asset() -> Weight {
(34_000_000 as Weight)
(22_029_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn transfer_ownership() -> Weight {
(39_000_000 as Weight)
(24_949_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_team() -> Weight {
(35_000_000 as Weight)
(21_936_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_metadata(_n: u32, s: u32, ) -> Weight {
(75_032_000 as Weight)
// Standard Error: 20_000
.saturating_add((18_000 as Weight).saturating_mul(s as Weight))
(49_509_000 as Weight)
// Standard Error: 0
.saturating_add((11_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn clear_metadata() -> Weight {
(70_000_000 as Weight)
(48_382_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_set_metadata(n: u32, s: u32, ) -> Weight {
(34_085_000 as Weight)
// Standard Error: 21_000
.saturating_add((48_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 21_000
.saturating_add((53_000 as Weight).saturating_mul(s as Weight))
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
(26_123_000 as Weight)
// Standard Error: 0
.saturating_add((6_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_clear_metadata() -> Weight {
(73_000_000 as Weight)
(50_089_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_asset_status() -> Weight {
(33_000_000 as Weight)
(22_589_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_transfer() -> Weight {
(67_000_000 as Weight)
(44_878_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn transfer_approved() -> Weight {
(149_000_000 as Weight)
(103_824_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
fn cancel_approval() -> Weight {
(62_000_000 as Weight)
(44_968_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_cancel_approval() -> Weight {
(71_000_000 as Weight)
(53_037_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand Down
Loading