Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update weights from v4 for v5 comparison #673

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 111 additions & 43 deletions polkadot-parachains/statemine/src/weights/pallet_assets.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
//! Autogenerated weights for pallet_assets
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.

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

// Cumulus 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 Cumulus. 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-05-31, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-04, 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
// ./target/release/polkadot-collator
// benchmark
// --chain=statemine-dev
// --execution=wasm
Expand All @@ -15,8 +31,11 @@
// --steps=50
// --repeat=20
// --raw
// --output=./runtime/statemine/src/weights/
// --header=./file_header.txt
// --output=./polkadot-parachains/statemine/src/weights


#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -26,134 +45,183 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_assets.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
(44_224_000 as Weight)
(42_810_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
(22_533_000 as Weight)
(22_161_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 {
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
// Storage: System Account (r:5000 w:5000)
// Storage: Assets Metadata (r:1 w:0)
// Storage: Assets Approvals (r:501 w:500)
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 37_000
.saturating_add((21_529_000 as Weight).saturating_mul(c as Weight))
.saturating_add((20_291_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 37_000
.saturating_add((28_905_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 377_000
.saturating_add((3_745_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add((27_058_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 378_000
.saturating_add((33_069_000 as Weight).saturating_mul(a as Weight))
Comment on lines -46 to +72
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did removing the approvals get so much more expensive? Ah, this is because it just updates the weights to v4 (which is missing in this branch because it wasn't upstreamed).

.saturating_add(T::DbWeight::get().reads(5 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)))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
(49_078_000 as Weight)
(48_712_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
(55_886_000 as Weight)
(55_472_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(84_857_000 as Weight)
(84_571_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(71_330_000 as Weight)
(69_636_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
(85_127_000 as Weight)
(84_470_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
(31_403_000 as Weight)
(32_969_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
(31_250_000 as Weight)
(32_804_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
(22_097_000 as Weight)
(24_490_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
(22_245_000 as Weight)
(24_614_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
(25_479_000 as Weight)
(27_181_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
(22_271_000 as Weight)
(24_654_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 {
(50_315_000 as Weight)
// Standard Error: 0
.saturating_add((8_000 as Weight).saturating_mul(s as Weight))
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn set_metadata(_n: u32, s: u32, ) -> Weight {
(51_018_000 as Weight)
// Standard Error: 1_000
.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))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
(48_134_000 as Weight)
(49_589_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 {
(25_933_000 as Weight)
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
(27_039_000 as Weight)
// Standard Error: 0
.saturating_add((7_000 as Weight).saturating_mul(s as Weight))
.saturating_add((5_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))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
(49_243_000 as Weight)
(49_270_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
(22_305_000 as Weight)
(23_112_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
(48_885_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(57_750_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
(108_026_000 as Weight)
(110_350_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
(48_943_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(58_045_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
(56_914_000 as Weight)
(60_120_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
}
47 changes: 36 additions & 11 deletions polkadot-parachains/statemine/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
//! Autogenerated weights for pallet_balances
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.

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

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

//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-05-31, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-04, 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
// ./target/release/polkadot-collator
// benchmark
// --chain=statemine-dev
// --execution=wasm
Expand All @@ -15,8 +31,11 @@
// --steps=50
// --repeat=20
// --raw
// --output=./runtime/statemine/src/weights/
// --header=./file_header.txt
// --output=./polkadot-parachains/statemine/src/weights


#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -26,33 +45,39 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_balances.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(79_381_000 as Weight)
(78_858_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(58_057_000 as Weight)
(58_667_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(28_834_000 as Weight)
(30_112_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(36_213_000 as Weight)
(37_745_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(78_526_000 as Weight)
(79_925_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(84_170_000 as Weight)
(73_280_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand Down
Loading