mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 10:37:58 +00:00
Update the frame-weight-template to use PhantomData from core (#13844)
* update weights template and recalculate weights from pallet template * update template file in benchmarking-cli
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for {{pallet}}.
|
||||
pub trait WeightInfo {
|
||||
|
||||
Generated
-1
@@ -6864,7 +6864,6 @@ dependencies = [
|
||||
"sp-core",
|
||||
"sp-io",
|
||||
"sp-runtime",
|
||||
"sp-std",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -20,7 +20,6 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive"
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../../../../frame/benchmarking" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../../../frame/support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../../frame/system" }
|
||||
sp-std = { version = "5.0.0", default-features = false, path = "../../../../primitives/std" }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { version = "7.0.0", path = "../../../../primitives/core" }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! Autogenerated weights for pallet_template
|
||||
//!
|
||||
//! 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: `[]`
|
||||
//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `<UNKNOWN>`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
|
||||
@@ -31,7 +31,7 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for pallet_template.
|
||||
pub trait WeightInfo {
|
||||
@@ -49,7 +49,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_000_000 picoseconds.
|
||||
Weight::from_parts(8_000_000, 0)
|
||||
Weight::from_parts(9_000_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: TemplateModule Something (r:1 w:1)
|
||||
@@ -58,7 +58,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 5_000_000 picoseconds.
|
||||
// Minimum execution time: 6_000_000 picoseconds.
|
||||
Weight::from_parts(6_000_000, 1489)
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
@@ -74,7 +74,7 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_000_000 picoseconds.
|
||||
Weight::from_parts(8_000_000, 0)
|
||||
Weight::from_parts(9_000_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: TemplateModule Something (r:1 w:1)
|
||||
@@ -83,7 +83,7 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 5_000_000 picoseconds.
|
||||
// Minimum execution time: 6_000_000 picoseconds.
|
||||
Weight::from_parts(6_000_000, 1489)
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `{{pallet}}`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
|
||||
Reference in New Issue
Block a user