From 57f4e0d6a25126014bfaa58f60efa94a3b2fccfc Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Mon, 4 Oct 2021 04:46:46 +0200 Subject: [PATCH 1/5] add bennchmark scripts and run benchmarks --- .github/workflows/ci.yml | 15 +-- Cargo.lock | 3 + runtime/Cargo.toml | 11 ++- runtime/src/lib.rs | 36 ++++--- runtime/src/weights/frame_system.rs | 75 ++++++++++++++ runtime/src/weights/mod.rs | 18 ++++ runtime/src/weights/pallet_balances.rs | 68 +++++++++++++ runtime/src/weights/pallet_multisig.rs | 124 +++++++++++++++++++++++ runtime/src/weights/pallet_proxy.rs | 126 ++++++++++++++++++++++++ runtime/src/weights/pallet_teerex.rs | 67 +++++++++++++ runtime/src/weights/pallet_timestamp.rs | 43 ++++++++ runtime/src/weights/pallet_treasury.rs | 67 +++++++++++++ runtime/src/weights/pallet_vesting.rs | 122 +++++++++++++++++++++++ scripts/benchmark_all_pallets.sh | 37 +++++++ 14 files changed, 785 insertions(+), 27 deletions(-) create mode 100644 runtime/src/weights/frame_system.rs create mode 100644 runtime/src/weights/mod.rs create mode 100644 runtime/src/weights/pallet_balances.rs create mode 100644 runtime/src/weights/pallet_multisig.rs create mode 100644 runtime/src/weights/pallet_proxy.rs create mode 100644 runtime/src/weights/pallet_teerex.rs create mode 100644 runtime/src/weights/pallet_timestamp.rs create mode 100644 runtime/src/weights/pallet_treasury.rs create mode 100644 runtime/src/weights/pallet_vesting.rs create mode 100755 scripts/benchmark_all_pallets.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e73be47..38a7f23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,8 @@ jobs: os: [ubuntu-latest] rust: [stable] rust-target: [x86_64-unknown-linux-gnu] - check: [fmt, clippy] +# check: [fmt --all -- --check, clippy -- -D warnings] + check: [fmt --all -- --check] # skip clippy for now env: RUST_BACKTRACE: full RUSTV: ${{ matrix.rust }} @@ -178,20 +179,12 @@ jobs: - name: Setup Rust toolchain run: rustup show - - name: Install llvm-10 - run: sudo apt-get install llvm-10 clang-10 - - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.rust-target }}-${{ matrix.check }} - - name: Fmt - if: ${{ matrix.check == 'fmt' }} - run: cargo fmt --all -- --check - - # - name: Clippy - # if: ${{ matrix.check == 'clippy' }} - # run: cargo clippy -- -D warnings + - name: ${{ matrix.check }} + run: cargo ${{ matrix.check }} build-runtimes: name: Build Runtimes diff --git a/Cargo.lock b/Cargo.lock index fb48753..6c14619 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3876,6 +3876,7 @@ name = "pallet-proxy" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=master#b391b82954ad95a927a921035e3017c4a0aad516" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -3953,6 +3954,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "hex-literal", "ias-verify", "log", "pallet-balances", @@ -4047,6 +4049,7 @@ name = "pallet-vesting" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=master#b391b82954ad95a927a921035e3017c4a0aad516" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 2b18878..8fbb2ed 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -101,11 +101,16 @@ runtime-benchmarks = [ "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system-benchmarking", - "frame-system/runtime-benchmarks", "hex-literal", + "sp-runtime/runtime-benchmarks", + # actual pallets to be benchmarked + "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-teerex/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", ] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 09918b2..8114622 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -60,6 +60,8 @@ use pallet_transaction_payment::CurrencyAdapter; pub use sp_runtime::BuildStorage; pub use sp_runtime::{Perbill, Permill}; +mod weights; + /// An index to a block. pub type BlockNumber = u32; @@ -258,7 +260,7 @@ impl frame_system::Config for Runtime { /// The data to be stored in an account. type AccountData = pallet_balances::AccountData; /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); + type SystemWeightInfo = weights::frame_system::WeightInfo; /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = SS58Prefix; /// The set code logic, just the default since we're not a parachain. @@ -305,7 +307,7 @@ impl pallet_timestamp::Config for Runtime { type Moment = Moment; type OnTimestampSet = (Aura, Teerex); type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); + type WeightInfo = weights::pallet_timestamp::WeightInfo; } parameter_types! { @@ -325,7 +327,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; + type WeightInfo = weights::pallet_balances::WeightInfo; type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -354,8 +356,7 @@ impl pallet_teerex::Config for Runtime { type Currency = pallet_balances::Pallet; type MomentsPerDay = MomentsPerDay; type MaxSilenceTime = MaxSilenceTime; - // currently we have only benchmarks there for the integritee-parachain - type WeightInfo = pallet_teerex::weights::IntegriteeWeight; + type WeightInfo = weights::pallet_teerex::WeightInfo; } parameter_types! { @@ -383,7 +384,7 @@ impl pallet_treasury::Config for Runtime { type BurnDestination = (); //No burn type SpendFunds = (); //No spend, no bounty type MaxApprovals = MaxApprovals; //0:cannot approve any proposal - type WeightInfo = (); + type WeightInfo = weights::pallet_treasury::WeightInfo; } parameter_types! { @@ -401,7 +402,7 @@ impl pallet_multisig::Config for Runtime { type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = (); + type WeightInfo = weights::pallet_multisig::WeightInfo; } parameter_types! { @@ -453,10 +454,10 @@ impl InstanceFilter for ProxyType { ), ProxyType::Governance => { matches!(c, Call::Treasury(..)) - }, + } ProxyType::CancelProxy => { matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) - }, + } } } fn is_superset(&self, o: &Self) -> bool { @@ -478,7 +479,7 @@ impl pallet_proxy::Config for Runtime { type ProxyDepositBase = ProxyDepositBase; type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; - type WeightInfo = (); + type WeightInfo = weights::pallet_proxy::WeightInfo; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; type AnnouncementDepositBase = AnnouncementDepositBase; @@ -494,7 +495,7 @@ impl pallet_vesting::Config for Runtime { type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); + type WeightInfo = weights::pallet_vesting::WeightInfo; const MAX_VESTING_SCHEDULES: u32 = 28; } @@ -719,9 +720,14 @@ impl_runtime_apis! { list_benchmark!(list, extra, frame_system, SystemBench::); list_benchmark!(list, extra, pallet_balances, Balances); + list_benchmark!(list, extra, pallet_multisig, Multisig); + list_benchmark!(list, extra, pallet_proxy, Proxy); + list_benchmark!(list, extra, pallet_scheduler, Scheduler); + list_benchmark!(list, extra, pallet_teerex, Teerex); list_benchmark!(list, extra, pallet_timestamp, Timestamp); list_benchmark!(list, extra, pallet_treasury, Treasury); - list_benchmark!(list, extra, pallet_multisig, Multisig); + list_benchmark!(list, extra, pallet_vesting, Vesting); + let storage_info = AllPalletsWithSystem::storage_info(); return (list, storage_info) @@ -755,9 +761,13 @@ impl_runtime_apis! { add_benchmark!(params, batches, frame_system, SystemBench::); add_benchmark!(params, batches, pallet_balances, Balances); + add_benchmark!(params, batches, pallet_multisig, Multisig); + add_benchmark!(params, batches, pallet_proxy, Proxy); + add_benchmark!(params, batches, pallet_scheduler, Scheduler); + add_benchmark!(params, batches, pallet_teerex, Teerex); add_benchmark!(params, batches, pallet_timestamp, Timestamp); add_benchmark!(params, batches, pallet_treasury, Treasury); - add_benchmark!(params, batches, pallet_multisig, Multisig); + add_benchmark!(params, batches, pallet_vesting, Vesting); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs new file mode 100644 index 0000000..82e265e --- /dev/null +++ b/runtime/src/weights/frame_system.rs @@ -0,0 +1,75 @@ + +//! Autogenerated weights for `frame_system` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/frame_system.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for frame_system. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + fn remark(b: u32, ) -> Weight { + (57_495_000 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + } + fn remark_with_event(b: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + } + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + (1_900_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a6368616e6765735f74726965] (r:0 w:1) + fn set_changes_trie_config() -> Weight { + (7_900_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Skipped Metadata (r:0 w:0) + fn set_storage(i: u32, ) -> Weight { + (2_969_000 as Weight) + // Standard Error: 3_000 + .saturating_add((893_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + // Storage: Skipped Metadata (r:0 w:0) + fn kill_storage(i: u32, ) -> Weight { + (443_000 as Weight) + // Standard Error: 2_000 + .saturating_add((602_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + // Storage: Skipped Metadata (r:0 w:0) + fn kill_prefix(p: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 7_000 + .saturating_add((876_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + } +} diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs new file mode 100644 index 0000000..d385e71 --- /dev/null +++ b/runtime/src/weights/mod.rs @@ -0,0 +1,18 @@ +//! The weights used in the runtime +//! +//! The current weights have been obtained with the following reference hardware: +//! * Core(TM) i7-10875H +//! * 32GB of RAM +//! * NVMe SSD + +// the generated files to not pass clippy +#![allow(clippy::all)] + +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_multisig; +pub mod pallet_proxy; +pub mod pallet_teerex; +pub mod pallet_timestamp; +pub mod pallet_treasury; +pub mod pallet_vesting; diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs new file mode 100644 index 0000000..3d06bfe --- /dev/null +++ b/runtime/src/weights/pallet_balances.rs @@ -0,0 +1,68 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_balances.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![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 { + // Storage: System Account (r:1 w:1) + fn transfer() -> Weight { + (77_200_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 { + (54_600_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_200_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 { + (34_800_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 { + (71_400_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 { + (66_200_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } +} diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs new file mode 100644 index 0000000..04073ec --- /dev/null +++ b/runtime/src/weights/pallet_multisig.rs @@ -0,0 +1,124 @@ + +//! Autogenerated weights for `pallet_multisig` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_multisig +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_multisig.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_multisig. +pub struct WeightInfo(PhantomData); +impl pallet_multisig::WeightInfo for WeightInfo { + fn as_multi_threshold_1(z: u32, ) -> Weight { + (6_551_000 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + fn as_multi_create(s: u32, z: u32, ) -> Weight { + (49_425_000 as Weight) + // Standard Error: 70_000 + .saturating_add((543_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + fn as_multi_create_store(_s: u32, z: u32, ) -> Weight { + (59_482_000 as Weight) + // Standard Error: 0 + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + (32_179_000 as Weight) + // Standard Error: 41_000 + .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:1) + fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { + (53_151_000 as Weight) + // Standard Error: 61_000 + .saturating_add((272_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn as_multi_complete(_s: u32, z: u32, ) -> Weight { + (72_386_000 as Weight) + // Standard Error: 0 + .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + fn approve_as_multi_create(s: u32, ) -> Weight { + (51_544_000 as Weight) + // Standard Error: 119_000 + .saturating_add((395_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: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:0) + fn approve_as_multi_approve(_s: u32, ) -> Weight { + (29_402_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn approve_as_multi_complete(s: u32, ) -> Weight { + (111_104_000 as Weight) + // Standard Error: 197_000 + .saturating_add((810_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Multisig Multisigs (r:1 w:1) + // Storage: Multisig Calls (r:1 w:1) + fn cancel_as_multi(s: u32, ) -> Weight { + (84_301_000 as Weight) + // Standard Error: 76_000 + .saturating_add((509_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } +} diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs new file mode 100644 index 0000000..eedbf16 --- /dev/null +++ b/runtime/src/weights/pallet_proxy.rs @@ -0,0 +1,126 @@ + +//! Autogenerated weights for `pallet_proxy` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_proxy +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_proxy.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_proxy. +pub struct WeightInfo(PhantomData); +impl pallet_proxy::WeightInfo for WeightInfo { + // Storage: Proxy Proxies (r:1 w:0) + fn proxy(p: u32, ) -> Weight { + (20_392_000 as Weight) + // Standard Error: 4_000 + .saturating_add((211_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + } + // Storage: Proxy Proxies (r:1 w:0) + // Storage: Proxy Announcements (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn proxy_announced(a: u32, p: u32, ) -> Weight { + (51_389_000 as Weight) + // Standard Error: 10_000 + .saturating_add((511_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 10_000 + .saturating_add((157_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Proxy Announcements (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn remove_announcement(a: u32, p: u32, ) -> Weight { + (33_769_000 as Weight) + // Standard Error: 7_000 + .saturating_add((576_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 8_000 + .saturating_add((7_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Proxy Announcements (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_announcement(a: u32, p: u32, ) -> Weight { + (31_544_000 as Weight) + // Standard Error: 5_000 + .saturating_add((608_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 5_000 + .saturating_add((46_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Proxy Proxies (r:1 w:0) + // Storage: Proxy Announcements (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn announce(a: u32, p: u32, ) -> Weight { + (46_961_000 as Weight) + // Standard Error: 8_000 + .saturating_add((597_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 8_000 + .saturating_add((156_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Proxy Proxies (r:1 w:1) + fn add_proxy(p: u32, ) -> Weight { + (36_105_000 as Weight) + // Standard Error: 8_000 + .saturating_add((481_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Proxy Proxies (r:1 w:1) + fn remove_proxy(p: u32, ) -> Weight { + (32_950_000 as Weight) + // Standard Error: 6_000 + .saturating_add((289_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Proxy Proxies (r:1 w:1) + fn remove_proxies(p: u32, ) -> Weight { + (32_593_000 as Weight) + // Standard Error: 5_000 + .saturating_add((218_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + // Storage: Proxy Proxies (r:1 w:1) + fn anonymous(p: u32, ) -> Weight { + (44_023_000 as Weight) + // Standard Error: 7_000 + .saturating_add((143_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)) + } + // Storage: Proxy Proxies (r:1 w:1) + fn kill_anonymous(p: u32, ) -> Weight { + (32_990_000 as Weight) + // Standard Error: 41_000 + .saturating_add((470_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } +} diff --git a/runtime/src/weights/pallet_teerex.rs b/runtime/src/weights/pallet_teerex.rs new file mode 100644 index 0000000..7bf55e0 --- /dev/null +++ b/runtime/src/weights/pallet_teerex.rs @@ -0,0 +1,67 @@ + +//! Autogenerated weights for `pallet_teerex` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_teerex +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_teerex.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_teerex. +pub struct WeightInfo(PhantomData); +impl pallet_teerex::WeightInfo for WeightInfo { + // Storage: Timestamp Now (r:1 w:0) + // Storage: Teerex EnclaveIndex (r:1 w:0) + // Storage: Teerex EnclaveRegistry (r:0 w:1) + fn register_enclave() -> Weight { + (1_802_600_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Teerex EnclaveIndex (r:1 w:2) + // Storage: Teerex EnclaveCount (r:1 w:1) + // Storage: Teerex EnclaveRegistry (r:1 w:2) + fn unregister_enclave() -> Weight { + (40_600_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + fn call_worker() -> Weight { + (53_700_000 as Weight) + } + // Storage: Teerex EnclaveIndex (r:1 w:0) + // Storage: Teerex WorkerForShard (r:0 w:1) + // Storage: Teerex LatestIpfsHash (r:0 w:1) + fn confirm_call() -> Weight { + (36_300_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Teerex EnclaveIndex (r:1 w:0) + // Storage: Teerex WorkerForShard (r:0 w:1) + // Storage: Teerex LatestIpfsHash (r:0 w:1) + fn confirm_block() -> Weight { + (35_200_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } +} diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs new file mode 100644 index 0000000..9e20df3 --- /dev/null +++ b/runtime/src/weights/pallet_timestamp.rs @@ -0,0 +1,43 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_timestamp.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![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 { + // Storage: Timestamp Now (r:1 w:1) + // Storage: Aura CurrentSlot (r:1 w:0) + // Storage: Teerex EnclaveRegistry (r:1 w:0) + fn set() -> Weight { + (13_700_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn on_finalize() -> Weight { + (4_500_000 as Weight) + } +} diff --git a/runtime/src/weights/pallet_treasury.rs b/runtime/src/weights/pallet_treasury.rs new file mode 100644 index 0000000..5ff44cf --- /dev/null +++ b/runtime/src/weights/pallet_treasury.rs @@ -0,0 +1,67 @@ + +//! Autogenerated weights for `pallet_treasury` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_treasury +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_treasury.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![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 { + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) + fn propose_spend() -> Weight { + (38_900_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn reject_proposal() -> Weight { + (35_100_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + fn approve_proposal(p: u32, ) -> Weight { + (10_647_000 as Weight) + // Standard Error: 14_000 + .saturating_add((320_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)) + } + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn on_initialize_proposals(p: u32, ) -> Weight { + (43_836_000 as Weight) + // Standard Error: 292_000 + .saturating_add((55_784_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + } +} diff --git a/runtime/src/weights/pallet_vesting.rs b/runtime/src/weights/pallet_vesting.rs new file mode 100644 index 0000000..2c12db8 --- /dev/null +++ b/runtime/src/weights/pallet_vesting.rs @@ -0,0 +1,122 @@ + +//! Autogenerated weights for `pallet_vesting` +//! +//! 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("integritee-mainnet-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-mainnet-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_vesting +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_vesting.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for pallet_vesting. +pub struct WeightInfo(PhantomData); +impl pallet_vesting::WeightInfo for WeightInfo { + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vest_locked(l: u32, _s: u32, ) -> Weight { + (63_556_000 as Weight) + // Standard Error: 17_000 + .saturating_add((6_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vest_unlocked(l: u32, s: u32, ) -> Weight { + (46_690_000 as Weight) + // Standard Error: 16_000 + .saturating_add((205_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 33_000 + .saturating_add((246_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn vest_other_locked(l: u32, s: u32, ) -> Weight { + (65_152_000 as Weight) + // Standard Error: 25_000 + .saturating_add((229_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 52_000 + .saturating_add((224_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + (55_710_000 as Weight) + // Standard Error: 22_000 + .saturating_add((291_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((242_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vested_transfer(l: u32, s: u32, ) -> Weight { + (89_621_000 as Weight) + // Standard Error: 32_000 + .saturating_add((228_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 67_000 + .saturating_add((474_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: System Account (r:2 w:2) + // Storage: Balances Locks (r:1 w:1) + fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { + (111_411_000 as Weight) + // Standard Error: 82_000 + .saturating_add((355_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (53_411_000 as Weight) + // Standard Error: 16_000 + .saturating_add((306_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 36_000 + .saturating_add((306_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Vesting Vesting (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (46_443_000 as Weight) + // Standard Error: 13_000 + .saturating_add((299_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 29_000 + .saturating_add((524_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } +} diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh new file mode 100755 index 0000000..d604022 --- /dev/null +++ b/scripts/benchmark_all_pallets.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Create `WeightInfo` implementations for all the pallets and store it in the weight module of the `runtime`. + +RUNTIME_WEIGHT_DIR=runtime/src/weights +NODE=./target/release/integritee-node + +mkdir -p $RUNTIME_WEIGHT_DIR + +pallets=( + "frame_system" \ + "pallet_balances" \ + "pallet_multisig" \ + "pallet_proxy" \ + "pallet_scheduler" \ + "pallet_timestamp" \ + "pallet_teerex" \ + "pallet_treasury" \ + "pallet_vesting" \ +) + +for pallet in ${pallets[*]}; do + echo benchmarking "$pallet"... + + $NODE \ + benchmark \ + --chain=integritee-mainnet-fresh \ + --steps=50 \ + --repeat=20 \ + --pallet="$pallet" \ + --extrinsic="*" \ + --execution=wasm \ + --wasm-execution=compiled \ + --heap-pages=4096 \ + --output=./$RUNTIME_WEIGHT_DIR/"$pallet".rs \ + +done From 68c07f51d747e188d602917f6c72da85ee173a2d Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 5 Oct 2021 04:19:23 +0200 Subject: [PATCH 2/5] [GA] update chain-spec name in benchmark scripts --- scripts/benchmark_all_pallets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh index d604022..61c73f2 100755 --- a/scripts/benchmark_all_pallets.sh +++ b/scripts/benchmark_all_pallets.sh @@ -24,7 +24,7 @@ for pallet in ${pallets[*]}; do $NODE \ benchmark \ - --chain=integritee-mainnet-fresh \ + --chain=integritee-solo-fresh \ --steps=50 \ --repeat=20 \ --pallet="$pallet" \ From a8d4bb9b8e47bf17706ecfdf481148f3b4933145 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 5 Oct 2021 04:24:49 +0200 Subject: [PATCH 3/5] add pallet-scheduler to benchmarks and re-run benchmarks --- runtime/src/lib.rs | 2 +- runtime/src/weights/frame_system.rs | 11 ++-- runtime/src/weights/mod.rs | 3 + runtime/src/weights/pallet_balances.rs | 18 +++--- runtime/src/weights/pallet_multisig.rs | 62 ++++++++++--------- runtime/src/weights/pallet_proxy.rs | 80 ++++++++++++------------ runtime/src/weights/pallet_scheduler.rs | 67 ++++++++++++++++++++ runtime/src/weights/pallet_teerex.rs | 19 +++--- runtime/src/weights/pallet_timestamp.rs | 10 +-- runtime/src/weights/pallet_treasury.rs | 22 +++---- runtime/src/weights/pallet_vesting.rs | 82 ++++++++++++------------- 11 files changed, 223 insertions(+), 153 deletions(-) create mode 100644 runtime/src/weights/pallet_scheduler.rs diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8114622..ccf5e37 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -513,7 +513,7 @@ impl pallet_scheduler::Config for Runtime { type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot; type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = (); + type WeightInfo = weights::pallet_scheduler::WeightInfo; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index 82e265e..d02b87d 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -1,14 +1,13 @@ - //! Autogenerated weights for `frame_system` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=frame_system @@ -41,13 +40,13 @@ impl frame_system::WeightInfo for WeightInfo { } // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (1_900_000 as Weight) + (1_600_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a6368616e6765735f74726965] (r:0 w:1) fn set_changes_trie_config() -> Weight { - (7_900_000 as Weight) + (7_400_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index d385e71..8550018 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -8,10 +8,13 @@ // the generated files to not pass clippy #![allow(clippy::all)] +// note: Always double check the frame_system generated weights. Sometimes some values +// are 0. Re-run benchmarks for this module until all weights have sensible values. pub mod frame_system; pub mod pallet_balances; pub mod pallet_multisig; pub mod pallet_proxy; +pub mod pallet_scheduler; pub mod pallet_teerex; pub mod pallet_timestamp; pub mod pallet_treasury; diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index 3d06bfe..867746f 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_balances` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_balances @@ -31,37 +31,37 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (77_200_000 as Weight) + (72_600_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 { - (54_600_000 as Weight) + (53_200_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_200_000 as Weight) + (27_600_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 { - (34_800_000 as Weight) + (33_600_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 { - (71_400_000 as Weight) + (69_800_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 { - (66_200_000 as Weight) + (64_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 04073ec..f719466 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_multisig` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_multisig @@ -30,16 +30,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(z: u32, ) -> Weight { - (6_551_000 as Weight) + (6_330_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create(s: u32, z: u32, ) -> Weight { - (49_425_000 as Weight) - // Standard Error: 70_000 - .saturating_add((543_000 as Weight).saturating_mul(s as Weight)) + (51_321_000 as Weight) + // Standard Error: 73_000 + .saturating_add((281_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -48,18 +48,18 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(_s: u32, z: u32, ) -> Weight { - (59_482_000 as Weight) + fn as_multi_create_store(s: u32, z: u32, ) -> Weight { + (57_103_000 as Weight) + // Standard Error: 115_000 + .saturating_add((796_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (32_179_000 as Weight) - // Standard Error: 41_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) + fn as_multi_approve(_s: u32, z: u32, ) -> Weight { + (31_382_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -68,11 +68,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (53_151_000 as Weight) - // Standard Error: 61_000 - .saturating_add((272_000 as Weight).saturating_mul(s as Weight)) + (50_606_000 as Weight) + // Standard Error: 87_000 + .saturating_add((412_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -80,25 +80,27 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn as_multi_complete(_s: u32, z: u32, ) -> Weight { - (72_386_000 as Weight) + (76_985_000 as Weight) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((5_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn approve_as_multi_create(s: u32, ) -> Weight { - (51_544_000 as Weight) - // Standard Error: 119_000 - .saturating_add((395_000 as Weight).saturating_mul(s as Weight)) + (45_893_000 as Weight) + // Standard Error: 46_000 + .saturating_add((447_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: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(_s: u32, ) -> Weight { - (29_402_000 as Weight) + fn approve_as_multi_approve(s: u32, ) -> Weight { + (28_533_000 as Weight) + // Standard Error: 22_000 + .saturating_add((158_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)) } @@ -106,18 +108,18 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn approve_as_multi_complete(s: u32, ) -> Weight { - (111_104_000 as Weight) - // Standard Error: 197_000 - .saturating_add((810_000 as Weight).saturating_mul(s as Weight)) + (114_475_000 as Weight) + // Standard Error: 132_000 + .saturating_add((1_011_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn cancel_as_multi(s: u32, ) -> Weight { - (84_301_000 as Weight) - // Standard Error: 76_000 - .saturating_add((509_000 as Weight).saturating_mul(s as Weight)) + (84_035_000 as Weight) + // Standard Error: 64_000 + .saturating_add((494_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index eedbf16..bc086f9 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_proxy` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_proxy @@ -31,42 +31,40 @@ pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) fn proxy(p: u32, ) -> Weight { - (20_392_000 as Weight) - // Standard Error: 4_000 - .saturating_add((211_000 as Weight).saturating_mul(p as Weight)) + (20_799_000 as Weight) + // Standard Error: 6_000 + .saturating_add((189_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn proxy_announced(a: u32, p: u32, ) -> Weight { - (51_389_000 as Weight) - // Standard Error: 10_000 - .saturating_add((511_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 10_000 - .saturating_add((157_000 as Weight).saturating_mul(p as Weight)) + (55_316_000 as Weight) + // Standard Error: 8_000 + .saturating_add((450_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 9_000 + .saturating_add((106_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn remove_announcement(a: u32, p: u32, ) -> Weight { - (33_769_000 as Weight) - // Standard Error: 7_000 - .saturating_add((576_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 8_000 - .saturating_add((7_000 as Weight).saturating_mul(p as Weight)) + (34_254_000 as Weight) + // Standard Error: 43_000 + .saturating_add((563_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 45_000 + .saturating_add((194_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) - fn reject_announcement(a: u32, p: u32, ) -> Weight { - (31_544_000 as Weight) - // Standard Error: 5_000 - .saturating_add((608_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 5_000 - .saturating_add((46_000 as Weight).saturating_mul(p as Weight)) + fn reject_announcement(a: u32, _p: u32, ) -> Weight { + (37_598_000 as Weight) + // Standard Error: 8_000 + .saturating_add((523_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -74,52 +72,52 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn announce(a: u32, p: u32, ) -> Weight { - (46_961_000 as Weight) - // Standard Error: 8_000 - .saturating_add((597_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 8_000 - .saturating_add((156_000 as Weight).saturating_mul(p as Weight)) + (50_571_000 as Weight) + // Standard Error: 35_000 + .saturating_add((717_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 36_000 + .saturating_add((15_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) fn add_proxy(p: u32, ) -> Weight { - (36_105_000 as Weight) - // Standard Error: 8_000 - .saturating_add((481_000 as Weight).saturating_mul(p as Weight)) + (40_812_000 as Weight) + // Standard Error: 6_000 + .saturating_add((264_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) fn remove_proxy(p: u32, ) -> Weight { - (32_950_000 as Weight) + (30_914_000 as Weight) // Standard Error: 6_000 - .saturating_add((289_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((300_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) fn remove_proxies(p: u32, ) -> Weight { - (32_593_000 as Weight) - // Standard Error: 5_000 - .saturating_add((218_000 as Weight).saturating_mul(p as Weight)) + (30_033_000 as Weight) + // Standard Error: 6_000 + .saturating_add((224_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) fn anonymous(p: u32, ) -> Weight { - (44_023_000 as Weight) - // Standard Error: 7_000 - .saturating_add((143_000 as Weight).saturating_mul(p as Weight)) + (42_555_000 as Weight) + // Standard Error: 15_000 + .saturating_add((182_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)) } // Storage: Proxy Proxies (r:1 w:1) fn kill_anonymous(p: u32, ) -> Weight { - (32_990_000 as Weight) - // Standard Error: 41_000 - .saturating_add((470_000 as Weight).saturating_mul(p as Weight)) + (36_447_000 as Weight) + // Standard Error: 12_000 + .saturating_add((150_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs new file mode 100644 index 0000000..318f99c --- /dev/null +++ b/runtime/src/weights/pallet_scheduler.rs @@ -0,0 +1,67 @@ + +//! Autogenerated weights for `pallet_scheduler` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 + +// Executed Command: +// ./target/release/integritee-node +// benchmark +// --chain=integritee-solo-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_scheduler +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/src/weights/pallet_scheduler.rs + + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![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 { + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule(s: u32, ) -> Weight { + (25_942_000 as Weight) + // Standard Error: 11_000 + .saturating_add((84_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + fn cancel(s: u32, ) -> Weight { + (21_862_000 as Weight) + // Standard Error: 4_000 + .saturating_add((843_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule_named(s: u32, ) -> Weight { + (28_447_000 as Weight) + // Standard Error: 12_000 + .saturating_add((199_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_named(s: u32, ) -> Weight { + (24_121_000 as Weight) + // Standard Error: 6_000 + .saturating_add((869_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } +} diff --git a/runtime/src/weights/pallet_teerex.rs b/runtime/src/weights/pallet_teerex.rs index 7bf55e0..6e9346c 100644 --- a/runtime/src/weights/pallet_teerex.rs +++ b/runtime/src/weights/pallet_teerex.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_teerex` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_teerex @@ -30,29 +30,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_teerex::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:0) + // Storage: Teerex AllowSGXDebugMode (r:1 w:0) // Storage: Teerex EnclaveIndex (r:1 w:0) // Storage: Teerex EnclaveRegistry (r:0 w:1) fn register_enclave() -> Weight { - (1_802_600_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + (1_882_600_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Teerex EnclaveIndex (r:1 w:2) // Storage: Teerex EnclaveCount (r:1 w:1) // Storage: Teerex EnclaveRegistry (r:1 w:2) fn unregister_enclave() -> Weight { - (40_600_000 as Weight) + (40_900_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn call_worker() -> Weight { - (53_700_000 as Weight) + (57_000_000 as Weight) } // Storage: Teerex EnclaveIndex (r:1 w:0) // Storage: Teerex WorkerForShard (r:0 w:1) // Storage: Teerex LatestIpfsHash (r:0 w:1) fn confirm_call() -> Weight { - (36_300_000 as Weight) + (39_200_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -60,7 +61,7 @@ impl pallet_teerex::WeightInfo for WeightInfo { // Storage: Teerex WorkerForShard (r:0 w:1) // Storage: Teerex LatestIpfsHash (r:0 w:1) fn confirm_block() -> Weight { - (35_200_000 as Weight) + (35_500_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index 9e20df3..1fc9faa 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_timestamp` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_timestamp @@ -33,11 +33,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Aura CurrentSlot (r:1 w:0) // Storage: Teerex EnclaveRegistry (r:1 w:0) fn set() -> Weight { - (13_700_000 as Weight) + (13_900_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (4_500_000 as Weight) + (4_400_000 as Weight) } } diff --git a/runtime/src/weights/pallet_treasury.rs b/runtime/src/weights/pallet_treasury.rs index 5ff44cf..d7b58ff 100644 --- a/runtime/src/weights/pallet_treasury.rs +++ b/runtime/src/weights/pallet_treasury.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_treasury` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_treasury @@ -32,23 +32,23 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (38_900_000 as Weight) + (38_700_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - (35_100_000 as Weight) + (35_400_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (10_647_000 as Weight) - // Standard Error: 14_000 - .saturating_add((320_000 as Weight).saturating_mul(p as Weight)) + (10_678_000 as Weight) + // Standard Error: 13_000 + .saturating_add((228_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)) } @@ -56,9 +56,9 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:2 w:2) fn on_initialize_proposals(p: u32, ) -> Weight { - (43_836_000 as Weight) - // Standard Error: 292_000 - .saturating_add((55_784_000 as Weight).saturating_mul(p as Weight)) + (41_279_000 as Weight) + // Standard Error: 406_000 + .saturating_add((55_173_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/src/weights/pallet_vesting.rs b/runtime/src/weights/pallet_vesting.rs index 2c12db8..493b15f 100644 --- a/runtime/src/weights/pallet_vesting.rs +++ b/runtime/src/weights/pallet_vesting.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_vesting` //! //! 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("integritee-mainnet-fresh"), DB CACHE: 128 +//! DATE: 2021-10-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 // Executed Command: // ./target/release/integritee-node // benchmark -// --chain=integritee-mainnet-fresh +// --chain=integritee-solo-fresh // --steps=50 // --repeat=20 // --pallet=pallet_vesting @@ -31,21 +31,23 @@ pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) - fn vest_locked(l: u32, _s: u32, ) -> Weight { - (63_556_000 as Weight) - // Standard Error: 17_000 - .saturating_add((6_000 as Weight).saturating_mul(l as Weight)) + fn vest_locked(l: u32, s: u32, ) -> Weight { + (46_716_000 as Weight) + // Standard Error: 11_000 + .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 22_000 + .saturating_add((322_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (46_690_000 as Weight) - // Standard Error: 16_000 - .saturating_add((205_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 33_000 - .saturating_add((246_000 as Weight).saturating_mul(s as Weight)) + (49_665_000 as Weight) + // Standard Error: 4_000 + .saturating_add((124_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 9_000 + .saturating_add((54_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -53,11 +55,11 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (65_152_000 as Weight) - // Standard Error: 25_000 - .saturating_add((229_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 52_000 - .saturating_add((224_000 as Weight).saturating_mul(s as Weight)) + (43_259_000 as Weight) + // Standard Error: 29_000 + .saturating_add((475_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 59_000 + .saturating_add((772_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -65,11 +67,11 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (55_710_000 as Weight) - // Standard Error: 22_000 - .saturating_add((291_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 45_000 - .saturating_add((242_000 as Weight).saturating_mul(s as Weight)) + (57_368_000 as Weight) + // Standard Error: 24_000 + .saturating_add((342_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 48_000 + .saturating_add((261_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -77,21 +79,19 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vested_transfer(l: u32, s: u32, ) -> Weight { - (89_621_000 as Weight) - // Standard Error: 32_000 - .saturating_add((228_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 67_000 - .saturating_add((474_000 as Weight).saturating_mul(s as Weight)) + (102_167_000 as Weight) + // Standard Error: 35_000 + .saturating_add((85_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 72_000 + .saturating_add((454_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:1 w:1) - fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (111_411_000 as Weight) - // Standard Error: 82_000 - .saturating_add((355_000 as Weight).saturating_mul(s as Weight)) + fn force_vested_transfer(_l: u32, _s: u32, ) -> Weight { + (128_327_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -99,11 +99,11 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (53_411_000 as Weight) - // Standard Error: 16_000 - .saturating_add((306_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 36_000 - .saturating_add((306_000 as Weight).saturating_mul(s as Weight)) + (68_031_000 as Weight) + // Standard Error: 25_000 + .saturating_add((226_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 54_000 + .saturating_add((378_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -111,11 +111,11 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (46_443_000 as Weight) - // Standard Error: 13_000 - .saturating_add((299_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 29_000 - .saturating_add((524_000 as Weight).saturating_mul(s as Weight)) + (68_829_000 as Weight) + // Standard Error: 22_000 + .saturating_add((189_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 47_000 + .saturating_add((257_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } From 761154f53976de2606b60843bf8566dda5dd216c Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 5 Oct 2021 04:31:36 +0200 Subject: [PATCH 4/5] update frame_system weights --- runtime/src/weights/frame_system.rs | 24 ++++++++++++------------ runtime/src/weights/mod.rs | 7 +++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index d02b87d..d70a3b3 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -29,7 +29,7 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { fn remark(b: u32, ) -> Weight { - (57_495_000 as Weight) + (574_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } @@ -40,35 +40,35 @@ impl frame_system::WeightInfo for WeightInfo { } // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (1_600_000 as Weight) + (1_800_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a6368616e6765735f74726965] (r:0 w:1) fn set_changes_trie_config() -> Weight { - (7_400_000 as Weight) + (8_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { - (2_969_000 as Weight) - // Standard Error: 3_000 - .saturating_add((893_000 as Weight).saturating_mul(i as Weight)) + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((887_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (443_000 as Weight) - // Standard Error: 2_000 - .saturating_add((602_000 as Weight).saturating_mul(i as Weight)) + (2_052_000 as Weight) + // Standard Error: 1_000 + .saturating_add((567_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 7_000 - .saturating_add((876_000 as Weight).saturating_mul(p as Weight)) + (3_640_000 as Weight) + // Standard Error: 2_000 + .saturating_add((799_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index 8550018..f6fe957 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -8,8 +8,11 @@ // the generated files to not pass clippy #![allow(clippy::all)] -// note: Always double check the frame_system generated weights. Sometimes some values -// are 0. Re-run benchmarks for this module until all weights have sensible values. +// note: Always double check the frame_system generated weights. Sometimes some values are 0, but +// return ridiculously high weights in another run. When re-running the benchmarks always perform +// sanity checks with substrate's weight for this module. The close to 0 values seem to be correct. +// +// Problematic functions are: `remark`, `remark_with_event`. pub mod frame_system; pub mod pallet_balances; pub mod pallet_multisig; From 4af434edc23bfe42e8ec4373a4c49e025a26a9e2 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 5 Oct 2021 05:09:47 +0200 Subject: [PATCH 5/5] run rustfmt --- runtime/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index ccf5e37..5cf25c7 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -454,10 +454,10 @@ impl InstanceFilter for ProxyType { ), ProxyType::Governance => { matches!(c, Call::Treasury(..)) - } + }, ProxyType::CancelProxy => { matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) - } + }, } } fn is_superset(&self, o: &Self) -> bool {