diff --git a/Cargo.lock b/Cargo.lock index 1c374dafd2..3e34e1fe2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5424,6 +5424,7 @@ name = "pallet-bounties" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "pallet-treasury", @@ -5576,6 +5577,7 @@ name = "pallet-indices" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -5816,6 +5818,7 @@ dependencies = [ "log", "parity-scale-codec", "sp-inherents", + "sp-io", "sp-runtime", "sp-std", "sp-timestamp", @@ -5884,6 +5887,7 @@ name = "pallet-treasury" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", @@ -5899,6 +5903,7 @@ name = "pallet-utility" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", diff --git a/runtime/bifrost/Cargo.toml b/runtime/bifrost/Cargo.toml index 8c160a24be..62324a5a6b 100644 --- a/runtime/bifrost/Cargo.toml +++ b/runtime/bifrost/Cargo.toml @@ -94,6 +94,7 @@ std = [ "frame-system/std", "node-primitives/std", "pallet-balances/std", + "pallet-bounties/std", "pallet-collective/std", "pallet-democracy/std", "pallet-indices/std", @@ -102,6 +103,7 @@ std = [ "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-treasury/std", "sp-api/std", "sp-arithmetic/std", "sp-block-builder/std", @@ -139,10 +141,17 @@ runtime-benchmarks = [ "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-bounties/runtime-benchmarks", "pallet-collective/runtime-benchmarks", + "pallet-indices/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", ] try-runtime = [ diff --git a/runtime/bifrost/src/lib.rs b/runtime/bifrost/src/lib.rs index 758464358a..3fc4f3307c 100644 --- a/runtime/bifrost/src/lib.rs +++ b/runtime/bifrost/src/lib.rs @@ -216,7 +216,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = Moment; type OnTimestampSet = (); - type WeightInfo = pallet_timestamp::weights::SubstrateWeight; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } parameter_types! { @@ -231,7 +231,7 @@ parameter_types! { impl pallet_utility::Config for Runtime { type Call = Call; type Event = Event; - type WeightInfo = pallet_utility::weights::SubstrateWeight; + type WeightInfo = weights::pallet_utility::WeightInfo; } parameter_types! { @@ -248,7 +248,7 @@ impl pallet_scheduler::Config for Runtime { type Origin = Origin; type PalletsOrigin = OriginCaller; type ScheduleOrigin = EnsureRoot; - type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type WeightInfo = weights::pallet_scheduler::WeightInfo; } parameter_types! { @@ -260,7 +260,7 @@ impl pallet_indices::Config for Runtime { type Currency = Balances; type Deposit = IndexDeposit; type Event = Event; - type WeightInfo = pallet_indices::weights::SubstrateWeight; + type WeightInfo = weights::pallet_indices::WeightInfo; } impl pallet_balances::Config for Runtime { @@ -274,7 +274,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type WeightInfo = pallet_balances::weights::SubstrateWeight; + type WeightInfo = weights::pallet_balances::WeightInfo; } impl pallet_transaction_payment::Config for Runtime { @@ -583,7 +583,7 @@ impl pallet_treasury::Config for Runtime { type RejectOrigin = EnsureRoot; type SpendFunds = Bounties; type SpendPeriod = SpendPeriod; - type WeightInfo = pallet_treasury::weights::SubstrateWeight; + type WeightInfo = weights::pallet_treasury::WeightInfo; } impl pallet_bounties::Config for Runtime { @@ -595,7 +595,7 @@ impl pallet_bounties::Config for Runtime { type DataDepositPerByte = DataDepositPerByte; type Event = Event; type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = pallet_bounties::weights::SubstrateWeight; + type WeightInfo = weights::pallet_bounties::WeightInfo; } construct_runtime! { @@ -803,6 +803,34 @@ impl_runtime_apis! { } } + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; + + let whitelist: Vec = vec![ + // you can whitelist any storage keys you do not want to track here + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + + // Adding the pallet you will perform thee benchmarking + add_benchmark!(params, batches, pallet_balances, Balances); + add_benchmark!(params, batches, pallet_bounties, Bounties); + add_benchmark!(params, batches, pallet_indices, Indices); + add_benchmark!(params, batches, pallet_scheduler, Scheduler); + add_benchmark!(params, batches, pallet_timestamp, Timestamp); + add_benchmark!(params, batches, pallet_treasury, Treasury); + add_benchmark!(params, batches, pallet_utility, Utility); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade() -> Result<(Weight, Weight), sp_runtime::RuntimeString> { diff --git a/runtime/bifrost/src/weights/mod.rs b/runtime/bifrost/src/weights/mod.rs index 1ce8ecc518..88c3bf4c23 100644 --- a/runtime/bifrost/src/weights/mod.rs +++ b/runtime/bifrost/src/weights/mod.rs @@ -20,4 +20,11 @@ //! A list of the different weight modules for our runtime. +pub mod pallet_balances; +pub mod pallet_bounties; +pub mod pallet_indices; +pub mod pallet_scheduler; +pub mod pallet_timestamp; +pub mod pallet_treasury; +pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/bifrost/src/weights/pallet_balances.rs b/runtime/bifrost/src/weights/pallet_balances.rs new file mode 100644 index 0000000000..a0aa9b6039 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_balances.rs @@ -0,0 +1,78 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_balances +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_balances. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + fn transfer() -> Weight { + (248_276_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn transfer_keep_alive() -> Weight { + (184_967_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn set_balance_creating() -> Weight { + (95_890_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn set_balance_killing() -> Weight { + (115_106_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn force_transfer() -> Weight { + (246_112_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + fn transfer_all() -> Weight { + (226_555_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } +} diff --git a/runtime/bifrost/src/weights/pallet_bounties.rs b/runtime/bifrost/src/weights/pallet_bounties.rs new file mode 100644 index 0000000000..1ce6d2f33d --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_bounties.rs @@ -0,0 +1,109 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_bounties +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_bounties +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_bounties. +pub struct WeightInfo(PhantomData); +impl pallet_bounties::WeightInfo for WeightInfo { + fn propose_bounty(d: u32) -> Weight { + (137_877_000 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } + fn approve_bounty() -> Weight { + (35_317_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn propose_curator() -> Weight { + (28_655_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn unassign_curator() -> Weight { + (175_914_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + fn accept_curator() -> Weight { + (118_264_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn award_bounty() -> Weight { + (78_249_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn claim_bounty() -> Weight { + (410_681_000 as Weight) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(7 as Weight)) + } + fn close_bounty_proposed() -> Weight { + (169_412_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } + fn close_bounty_active() -> Weight { + (280_834_000 as Weight) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(7 as Weight)) + } + fn extend_bounty_expiry() -> Weight { + (74_952_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn spend_funds(b: u32) -> Weight { + (1_383_602_000 as Weight) + // Standard Error: 2_279_000 + .saturating_add((150_816_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) + } +} diff --git a/runtime/bifrost/src/weights/pallet_indices.rs b/runtime/bifrost/src/weights/pallet_indices.rs new file mode 100644 index 0000000000..5342a9c9d2 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_indices.rs @@ -0,0 +1,73 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_indices +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_indices +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_indices. +pub struct WeightInfo(PhantomData); +impl pallet_indices::WeightInfo for WeightInfo { + fn claim() -> Weight { + (130_555_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn transfer() -> Weight { + (164_299_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn free() -> Weight { + (132_599_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn force_transfer() -> Weight { + (134_983_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn freeze() -> Weight { + (120_396_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } +} diff --git a/runtime/bifrost/src/weights/pallet_scheduler.rs b/runtime/bifrost/src/weights/pallet_scheduler.rs new file mode 100644 index 0000000000..136c0042f1 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_scheduler.rs @@ -0,0 +1,76 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_scheduler +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_scheduler +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_scheduler. +pub struct WeightInfo(PhantomData); +impl pallet_scheduler::WeightInfo for WeightInfo { + fn schedule(s: u32) -> Weight { + (79_887_000 as Weight) + // Standard Error: 4_000 + .saturating_add((353_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn cancel(s: u32) -> Weight { + (75_324_000 as Weight) + // Standard Error: 32_000 + .saturating_add((9_873_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn schedule_named(s: u32) -> Weight { + (99_023_000 as Weight) + // Standard Error: 7_000 + .saturating_add((350_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn cancel_named(s: u32) -> Weight { + (68_604_000 as Weight) + // Standard Error: 97_000 + .saturating_add((9_926_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } +} diff --git a/runtime/bifrost/src/weights/pallet_timestamp.rs b/runtime/bifrost/src/weights/pallet_timestamp.rs new file mode 100644 index 0000000000..5d7aa90739 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_timestamp.rs @@ -0,0 +1,56 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_timestamp +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_timestamp. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + fn set() -> Weight { + (24_637_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn on_finalize() -> Weight { + (11_001_000 as Weight) + } +} diff --git a/runtime/bifrost/src/weights/pallet_treasury.rs b/runtime/bifrost/src/weights/pallet_treasury.rs new file mode 100644 index 0000000000..99fe095343 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_treasury.rs @@ -0,0 +1,74 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_treasury +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_treasury +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_treasury. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + fn propose_spend() -> Weight { + (132_753_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn reject_proposal() -> Weight { + (171_186_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + fn approve_proposal(p: u32) -> Weight { + (38_091_000 as Weight) + // Standard Error: 7_000 + .saturating_add((293_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn on_initialize_proposals(p: u32) -> Weight { + (150_370_000 as Weight) + // Standard Error: 3_556_000 + .saturating_add((177_794_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + } +} diff --git a/runtime/bifrost/src/weights/pallet_utility.rs b/runtime/bifrost/src/weights/pallet_utility.rs new file mode 100644 index 0000000000..43b35b9219 --- /dev/null +++ b/runtime/bifrost/src/weights/pallet_utility.rs @@ -0,0 +1,65 @@ +// This file is part of Bifrost. + +// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program 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. + +// This program 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 this program. If not, see . + +//! Autogenerated weights for pallet_utility +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-08-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128 + +// Executed Command: +// target/release/bifrost +// benchmark +// --chain=bifrost-genesis +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./HEADER-GPL3 +// --output=./runtime/bifrost/src/weights/ + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_utility. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + fn batch(c: u32) -> Weight { + (44_360_000 as Weight) + // Standard Error: 7_000 + .saturating_add((6_778_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn as_derivative() -> Weight { + (19_316_000 as Weight) + } + fn batch_all(c: u32) -> Weight { + (638_011_000 as Weight) + // Standard Error: 79_000 + .saturating_add((6_251_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } +}