apply benchmarked weight as default

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky 2026-09-05 23:41:03 +03:00
parent c4f22df03d
commit 06af604cc8
Signed by: st1nky
GPG Key ID: 016064BD97603B40
2 changed files with 166 additions and 37 deletions

View File

@ -50,30 +50,30 @@ std = [
"frame-support/std", "frame-support/std",
"frame-system/std", "frame-system/std",
"frame-benchmarking?/std", "frame-benchmarking?/std",
"sp-application-crypto/std", "sp-application-crypto/std",
"sp-runtime/std", "sp-runtime/std",
"sp-arithmetic/std", "sp-arithmetic/std",
"sp-keystore?/std", "sp-keystore?/std",
"sp-core/std", "sp-core/std",
"sp-std/std", "sp-std/std",
"sp-io/std", "sp-io/std",
"ghost-networks/std", "ghost-networks/std",
"ghost-helpers/std", "ghost-helpers/std",
"ghost-traits/std", "ghost-traits/std",
"pallet-balances/std", "pallet-balances/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"ghost-networks/runtime-benchmarks", "ghost-networks/runtime-benchmarks",
"pallet-balances/runtime-benchmarks", "pallet-balances/runtime-benchmarks",
"ghost-helpers/runtime-benchmarks", "ghost-helpers/runtime-benchmarks",
"sp-keystore" "sp-keystore"
] ]
try-runtime = [ try-runtime = [
"frame-support/try-runtime", "frame-support/try-runtime",
"frame-system/try-runtime", "frame-system/try-runtime",
"ghost-networks/try-runtime", "ghost-networks/try-runtime",
"pallet-balances/try-runtime", "pallet-balances/try-runtime",
] ]

View File

@ -1,23 +1,152 @@
use frame_support::weights::Weight; // 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_weaver`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2026-09-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=ghost_weaver
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/ghost_weaver.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{
traits::Get,
weights::{Weight, constants::RocksDbWeight},
};
use core::marker::PhantomData;
pub trait WeightInfo { pub trait WeightInfo {
fn extend_warp() -> Weight; fn extend_warp(a: u32,) -> Weight;
fn weave_weft() -> Weight; fn weave_weft(a: u32,) -> Weight;
fn pull_evm_thread() -> Weight; fn pull_evm_thread() -> Weight;
fn pull_utxo_thread() -> Weight; fn pull_utxo_thread(a: u32) -> Weight;
} }
impl WeightInfo for () { impl WeightInfo for () {
fn extend_warp() -> Weight { /// Storage: `GhostWeaver::DisabledAuthorities` (r:1 w:0)
Default::default() /// Proof: `GhostWeaver::DisabledAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
} /// Storage: `GhostWeaver::Authorities` (r:1 w:0)
fn weave_weft() -> Weight { /// Proof: `GhostWeaver::Authorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
Default::default() /// Storage: `GhostNetworks::Networks` (r:1 w:0)
} /// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn pull_evm_thread() -> Weight { /// Storage: `GhostWeaver::TapestryDrafts` (r:1 w:0)
Default::default() /// Proof: `GhostWeaver::TapestryDrafts` (`max_values`: None, `max_size`: None, mode: `Measured`)
} /// Storage: `GhostWeaver::NetworkAttestations` (r:1 w:1)
fn pull_utxo_thread() -> Weight { /// Proof: `GhostWeaver::NetworkAttestations` (`max_values`: None, `max_size`: None, mode: `Measured`)
Default::default() /// The range of component `a` is `[1, 300]`.
} fn extend_warp(a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `223 + a * (32 ±0)`
// Estimated: `3687 + a * (32 ±0)`
// Minimum execution time: 215_336_000 picoseconds.
Weight::from_parts(218_119_120, 0)
.saturating_add(Weight::from_parts(0, 3687))
// Standard Error: 1_412
.saturating_add(Weight::from_parts(47_848, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(5))
.saturating_add(RocksDbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(a.into()))
}
/// Storage: `GhostWeaver::DisabledAuthorities` (r:1 w:0)
/// Proof: `GhostWeaver::DisabledAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::Authorities` (r:1 w:0)
/// Proof: `GhostWeaver::Authorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::TapestryDrafts` (r:1 w:0)
/// Proof: `GhostWeaver::TapestryDrafts` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::TapestryStrands` (r:1 w:1)
/// Proof: `GhostWeaver::TapestryStrands` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::WeavingStates` (r:1 w:1)
/// Proof: `GhostWeaver::WeavingStates` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `a` is `[1, 300]`.
fn weave_weft(a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `518 + a * (32 ±0)`
// Estimated: `3982 + a * (32 ±0)`
// Minimum execution time: 244_811_000 picoseconds.
Weight::from_parts(250_046_200, 0)
.saturating_add(Weight::from_parts(0, 3982))
// Standard Error: 1_958
.saturating_add(Weight::from_parts(26_347, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(6))
.saturating_add(RocksDbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(a.into()))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::LoomStates` (r:1 w:0)
/// Proof: `GhostWeaver::LoomStates` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::PulledThreads` (r:1 w:1)
/// Proof: `GhostWeaver::PulledThreads` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::GatekeeperAmounts` (r:1 w:1)
/// Proof: `GhostNetworks::GatekeeperAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::NetworkImbalance` (r:1 w:1)
/// Proof: `GhostNetworks::NetworkImbalance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[1, 300]`.
fn pull_utxo_thread(_a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3823`
// Minimum execution time: 650_006_000 picoseconds.
Weight::from_parts(663_001_690, 0)
.saturating_add(Weight::from_parts(0, 3823))
.saturating_add(RocksDbWeight::get().reads(6))
.saturating_add(RocksDbWeight::get().writes(3))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::LoomStates` (r:1 w:0)
/// Proof: `GhostWeaver::LoomStates` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostWeaver::PulledThreads` (r:1 w:1)
/// Proof: `GhostWeaver::PulledThreads` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::GatekeeperAmounts` (r:1 w:1)
/// Proof: `GhostNetworks::GatekeeperAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::NetworkImbalance` (r:1 w:1)
/// Proof: `GhostNetworks::NetworkImbalance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn pull_evm_thread() -> Weight {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3823`
// Minimum execution time: 138_199_000 picoseconds.
Weight::from_parts(162_645_000, 0)
.saturating_add(Weight::from_parts(0, 3823))
.saturating_add(RocksDbWeight::get().reads(6))
.saturating_add(RocksDbWeight::get().writes(3))
}
} }