Skip to content
Snippets Groups Projects
Commit 0bfd3e4d authored by bgallois's avatar bgallois Committed by Pascal Engélibert
Browse files

feat(runtimes): use our benchmarks for pallet certification

parent d3730345
No related branches found
No related tags found
1 merge request!145Certification pallet benchmark
Pipeline #19446 passed
......@@ -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;
}
......
......@@ -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;
// 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)))
}
}
// 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)))
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment