-
* fix process_refund_queue weight * add weight limit tests * benchmark process_refund_queue overhead * add pallet-quota benchmarks
* fix process_refund_queue weight * add weight limit tests * benchmark process_refund_queue overhead * add pallet-quota benchmarks
pallet_quota.rs 4.70 KiB
//! Autogenerated weights for `pallet_quota`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/release/duniter
// benchmark
// pallet
// --chain
// dev
// --wasm-execution=compiled
// --pallet
// pallet-quota
// --extrinsic
// *
// --steps
// 50
// --repeat
// 20
// --output=runtime/common/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_quota`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> {
/// Storage: Quota RefundQueue (r:1 w:1)
/// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: MaxEncodedLen)
fn queue_refund() -> Weight {
// Proof Size summary in bytes:
// Measured: `11288`
// Estimated: `12751`
// Minimum execution time: 7_021_000 picoseconds.
Weight::from_parts(7_228_000, 0)
.saturating_add(Weight::from_parts(0, 12751))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Quota IdtyQuota (r:1 w:1)
/// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen)
fn spend_quota() -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `3489`
// Minimum execution time: 3_635_000 picoseconds.
Weight::from_parts(3_768_000, 0)
.saturating_add(Weight::from_parts(0, 3489))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Quota IdtyQuota (r:1 w:1)
/// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:0)
/// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen)
fn try_refund() -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `3591`
// Minimum execution time: 11_415_000 picoseconds.
Weight::from_parts(11_717_000, 0)
.saturating_add(Weight::from_parts(0, 3591))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Quota IdtyQuota (r:1 w:1)
/// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:0)
/// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen)
fn do_refund() -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `3591`
// Minimum execution time: 10_849_000 picoseconds.
Weight::from_parts(11_263_000, 0)
.saturating_add(Weight::from_parts(0, 3591))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Quota RefundQueue (r:1 w:1)
/// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: MaxEncodedLen)
fn on_process_refund_queue() -> Weight {
// Proof Size summary in bytes:
// Measured: `43`
// Estimated: `12751`
// Minimum execution time: 1_530_000 picoseconds.
Weight::from_parts(1_646_000, 0)
.saturating_add(Weight::from_parts(0, 12751))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Quota RefundQueue (r:1 w:1)
/// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: Measured)
/// Storage: Quota IdtyQuota (r:1 w:1)
/// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: Measured)
/// Storage: System Account (r:1 w:0)
/// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: Measured)
/// The range of component `i` is `[1, 256]`.
fn on_process_refund_queue_elements(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `164 + i * (44 ±0)`
// Estimated: `3628 + i * (44 ±0)`
// Minimum execution time: 13_465_000 picoseconds.
Weight::from_parts(19_579_671, 0)
.saturating_add(Weight::from_parts(0, 3628))
// Standard Error: 1_313
.saturating_add(Weight::from_parts(465_028, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 44).saturating_mul(i.into()))
}
}