326 lines
13 KiB
Rust
326 lines
13 KiB
Rust
|
// This file is part of Ghost Network.
|
||
|
|
||
|
// Ghost Network is free software: you can redistribute it and/or modify
|
||
|
// it under the terms of the GNU General Public License as published by
|
||
|
// the Free Software Foundation, either version 3 of the License, or
|
||
|
// (at your option) any later version.
|
||
|
|
||
|
// Ghost Network is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
// GNU General Public License for more details.
|
||
|
|
||
|
// You should have received a copy of the GNU General Public License
|
||
|
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
|
||
|
|
||
|
//! Autogenerated weights for `ghost_networks`
|
||
|
//!
|
||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||
|
//! DATE: 2023-11-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||
|
//! WORST CASE MAP SIZE: `1000000`
|
||
|
//! HOSTNAME: `ghost`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
|
||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("casper-dev"), DB CACHE: 1024
|
||
|
|
||
|
// Executed Command:
|
||
|
// ./target/production/ghost
|
||
|
// benchmark
|
||
|
// pallet
|
||
|
// --chain=casper-dev
|
||
|
// --steps=50
|
||
|
// --repeat=20
|
||
|
// --pallet=ghost_networks
|
||
|
// --extrinsic=*
|
||
|
// --execution=wasm
|
||
|
// --wasm-execution=compiled
|
||
|
// --header=./file_header.txt
|
||
|
// --output=./runtime/casper/src/weights/ghost_networks.rs
|
||
|
|
||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||
|
#![allow(unused_parens)]
|
||
|
#![allow(unused_imports)]
|
||
|
|
||
|
use frame_support::{
|
||
|
traits::Get,
|
||
|
weights::{
|
||
|
Weight, constants::RocksDbWeight
|
||
|
}
|
||
|
};
|
||
|
use sp_std::marker::PhantomData;
|
||
|
|
||
|
/// Weight functions needed for ghost_networks
|
||
|
pub trait WeightInfo {
|
||
|
fn register_network(n: u32, m: u32, ) -> Weight;
|
||
|
fn update_network_name(n: u32, ) -> Weight;
|
||
|
fn update_network_endpoint(n: u32, ) -> Weight;
|
||
|
fn update_network_finality_delay() -> Weight;
|
||
|
fn update_network_release_delay() -> Weight;
|
||
|
fn update_network_type() -> Weight;
|
||
|
fn update_network_gatekeeper() -> Weight;
|
||
|
fn update_network_topic_name() -> Weight;
|
||
|
fn update_incoming_network_fee() -> Weight;
|
||
|
fn update_outgoing_network_fee() -> Weight;
|
||
|
fn remove_network() -> Weight;
|
||
|
}
|
||
|
|
||
|
/// Weight for ghost_networks using the Substrate node and recommended hardware.
|
||
|
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||
|
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 20]`.
|
||
|
/// The range of component `m` is `[1, 150]`.
|
||
|
fn register_network(_n: u32, _m: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `76`
|
||
|
// Estimated: `2551`
|
||
|
// Minimum execution time: 32_086 nanoseconds.
|
||
|
Weight::from_parts(33_092_855, 2551)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 20]`.
|
||
|
fn update_network_name(_n: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_496 nanoseconds.
|
||
|
Weight::from_parts(35_728_230, 2616)
|
||
|
// Standard Error: 2_591
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 150]`.
|
||
|
fn update_network_endpoint(_n: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_666 nanoseconds.
|
||
|
Weight::from_parts(35_959_961, 2616)
|
||
|
// Standard Error: 381
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_finality_delay() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_860 nanoseconds.
|
||
|
Weight::from_parts(34_995_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_release_delay() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_860 nanoseconds.
|
||
|
Weight::from_parts(34_995_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_type() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_976 nanoseconds.
|
||
|
Weight::from_parts(36_182_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_gatekeeper() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_topic_name() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_incoming_network_fee() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_outgoing_network_fee() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn remove_network() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_336 nanoseconds.
|
||
|
Weight::from_parts(34_609_000, 2616)
|
||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl WeightInfo for () {
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 20]`.
|
||
|
/// The range of component `m` is `[1, 150]`.
|
||
|
fn register_network(_n: u32, _m: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `76`
|
||
|
// Estimated: `2551`
|
||
|
// Minimum execution time: 32_086 nanoseconds.
|
||
|
Weight::from_parts(33_092_855, 2551)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 20]`.
|
||
|
fn update_network_name(_n: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_496 nanoseconds.
|
||
|
Weight::from_parts(35_728_230, 2616)
|
||
|
// Standard Error: 2_591
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
/// The range of component `n` is `[1, 150]`.
|
||
|
fn update_network_endpoint(_n: u32, ) -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_666 nanoseconds.
|
||
|
Weight::from_parts(35_959_961, 2616)
|
||
|
// Standard Error: 381
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_finality_delay() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_860 nanoseconds.
|
||
|
Weight::from_parts(34_995_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_release_delay() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_860 nanoseconds.
|
||
|
Weight::from_parts(34_995_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_type() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_976 nanoseconds.
|
||
|
Weight::from_parts(36_182_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_gatekeeper() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_network_topic_name() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_incoming_network_fee() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn update_outgoing_network_fee() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 34_768 nanoseconds.
|
||
|
Weight::from_parts(35_580_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
/// Storage: GhostNetworks Networks (r:1 w:1)
|
||
|
/// Proof Skipped: GhostNetworks Networks (max_values: None, max_size: None, mode: Measured)
|
||
|
fn remove_network() -> Weight {
|
||
|
// Proof Size summary in bytes:
|
||
|
// Measured: `141`
|
||
|
// Estimated: `2616`
|
||
|
// Minimum execution time: 33_336 nanoseconds.
|
||
|
Weight::from_parts(34_609_000, 2616)
|
||
|
.saturating_add(RocksDbWeight::get().reads(1))
|
||
|
.saturating_add(RocksDbWeight::get().writes(1))
|
||
|
}
|
||
|
}
|