diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index d7ed072b1e374ae0ff17f85d966043dbfa64c831..6c34a13ffd3473d88c23070c636c41acaa813c8b 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -463,6 +463,7 @@ macro_rules! pallets_config { type OnNewcert = Wot; type OnRemovedCert = Wot; type RuntimeEvent = RuntimeEvent; + type WeightInfo = common_runtime::weights::pallet_certification_cert::WeightInfo<Runtime>; type ValidityPeriod = ValidityPeriod; } @@ -497,6 +498,7 @@ macro_rules! pallets_config { type OnNewcert = SmithsSubWot; type OnRemovedCert = SmithsSubWot; type RuntimeEvent = RuntimeEvent; + type WeightInfo = common_runtime::weights::pallet_certification_smiths_cert::WeightInfo<Runtime>; type ValidityPeriod = SmithValidityPeriod; } diff --git a/runtime/common/src/weights.rs b/runtime/common/src/weights.rs index 22f200ef36c4680ca5fc69e4a61b54122f15a03b..2798093fb0f01c5e3e6e678f84f0a180d72e2ff3 100644 --- a/runtime/common/src/weights.rs +++ b/runtime/common/src/weights.rs @@ -32,4 +32,6 @@ pub mod pallet_universal_dividend; pub mod pallet_upgrade_origin; pub mod pallet_provide_randomness; pub mod pallet_duniter_account; +pub mod pallet_certification_cert; +pub mod pallet_certification_smiths_cert; pub mod paritydb_weights; diff --git a/runtime/common/src/weights/pallet_certification_cert.rs b/runtime/common/src/weights/pallet_certification_cert.rs new file mode 100644 index 0000000000000000000000000000000000000000..44140695115a66338b96c25d907af876ec43d299 --- /dev/null +++ b/runtime/common/src/weights/pallet_certification_cert.rs @@ -0,0 +1,96 @@ +// Copyright 2021-2022 Axiom-Team +// +// This file is part of Duniter-v2S. +// +// Duniter-v2S is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Duniter-v2S 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. + +//! Autogenerated weights for `common_runtime::certification` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `benjamin-xps139380`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/duniter +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=common_runtime::certification +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./file_header.txt +// --output=./runtime/common/src/weights/ + +#![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 `common_runtime::certification`. +pub struct WeightInfo<T>(PhantomData<T>); +impl<T: frame_system::Config> pallet_certification::WeightInfo for WeightInfo<T> { + // Storage: Cert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: Cert StorageCertsRemovableOn (r:1 w:1) + // Storage: Cert CertsByReceiver (r:1 w:1) + fn force_add_cert() -> Weight { + // Minimum execution time: 125_388 nanoseconds. + Weight::from_ref_time(140_411_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + } + // Storage: Identity Identities (r:2 w:0) + // Storage: Cert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: Cert StorageCertsRemovableOn (r:1 w:1) + // Storage: Cert CertsByReceiver (r:1 w:1) + fn add_cert() -> Weight { + // Minimum execution time: 147_817 nanoseconds. + Weight::from_ref_time(153_330_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + } + // Storage: Cert CertsByReceiver (r:1 w:1) + // Storage: Cert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: Membership Membership (r:1 w:0) + fn del_cert() -> Weight { + // Minimum execution time: 125_695 nanoseconds. + Weight::from_ref_time(150_360_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: Cert CertsByReceiver (r:1 w:1) + // Storage: Cert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: Membership Membership (r:1 w:0) + /// The range of component `i` is `[2, 1000]`. + /// The range of component `i` is `[2, 1000]`. + fn remove_all_certs_received_by(i: u32, ) -> Weight { + // Minimum execution time: 129_529 nanoseconds. + Weight::from_ref_time(132_136_000 as u64) + // Standard Error: 75_161 + .saturating_add(Weight::from_ref_time(38_016_325 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + } +} diff --git a/runtime/common/src/weights/pallet_certification_smiths_cert.rs b/runtime/common/src/weights/pallet_certification_smiths_cert.rs new file mode 100644 index 0000000000000000000000000000000000000000..0c7eab26fd00eaea0d4dc96214bfd8cc95fb85b2 --- /dev/null +++ b/runtime/common/src/weights/pallet_certification_smiths_cert.rs @@ -0,0 +1,96 @@ +// Copyright 2021-2022 Axiom-Team +// +// This file is part of Duniter-v2S. +// +// Duniter-v2S is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Duniter-v2S 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. + +//! Autogenerated weights for `common_runtime::certification` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `benjamin-xps139380`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/duniter +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=common_runtime::certification +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./file_header.txt +// --output=./runtime/common/src/weights/ + +#![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 `common_runtime::certification`. +pub struct WeightInfo<T>(PhantomData<T>); +impl<T: frame_system::Config> pallet_certification::WeightInfo for WeightInfo<T> { + // Storage: SmithsCert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: SmithsCert StorageCertsRemovableOn (r:1 w:1) + // Storage: SmithsCert CertsByReceiver (r:1 w:1) + fn force_add_cert() -> Weight { + // Minimum execution time: 125_287 nanoseconds. + Weight::from_ref_time(128_059_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + } + // Storage: Identity Identities (r:2 w:0) + // Storage: SmithsCert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: SmithsCert StorageCertsRemovableOn (r:1 w:1) + // Storage: SmithsCert CertsByReceiver (r:1 w:1) + fn add_cert() -> Weight { + // Minimum execution time: 147_626 nanoseconds. + Weight::from_ref_time(152_571_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + } + // Storage: SmithsCert CertsByReceiver (r:1 w:1) + // Storage: SmithsCert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: SmithsMembership Membership (r:1 w:0) + fn del_cert() -> Weight { + // Minimum execution time: 126_824 nanoseconds. + Weight::from_ref_time(130_111_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: SmithsCert CertsByReceiver (r:1 w:1) + // Storage: SmithsCert StorageIdtyCertMeta (r:2 w:2) + // Storage: Parameters ParametersStorage (r:1 w:0) + // Storage: SmithsMembership Membership (r:1 w:0) + /// The range of component `i` is `[2, 1000]`. + /// The range of component `i` is `[2, 1000]`. + fn remove_all_certs_received_by(i: u32, ) -> Weight { + // Minimum execution time: 130_926 nanoseconds. + Weight::from_ref_time(133_225_000 as u64) + // Standard Error: 66_989 + .saturating_add(Weight::from_ref_time(37_841_523 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + } +}