1515// See the License for the specific language governing permissions and
1616// limitations under the License.
1717
18- //! Autogenerated weights for {{ pallet }}
18+ {{ header }}
19+ //! Autogenerated weights for `{{ pallet }} `
1920//!
2021//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{ version }}
21- //! DATE: {{ date }} , STEPS: {{ cmd.steps }} , REPEAT: {{ cmd.repeat }} , LOW RANGE: {{ cmd.lowest_range_values }} , HIGH RANGE: {{ cmd.highest_range_values }}
22- //! EXECUTION: {{ cmd.execution }} , WASM-EXECUTION: {{ cmd.wasm_execution }} , CHAIN: {{ cmd.chain }} , DB CACHE: {{ cmd.db_cache }}
22+ //! DATE: {{ date }} , STEPS: `{{ cmd.steps }} `, REPEAT: `{{ cmd.repeat }} `, LOW RANGE: `{{ cmd.lowest_range_values }} `, HIGH RANGE: `{{ cmd.highest_range_values }} `
23+ //! WORST CASE MAP SIZE: `{{ cmd.worst_case_map_values }} `
24+ //! HOSTNAME: `{{ hostname }} `, CPU: `{{ cpuname }} `
25+ //! WASM-EXECUTION: `{{ cmd.wasm_execution }} `, CHAIN: `{{ cmd.chain }} `, DB CACHE: `{{ cmd.db_cache }} `
2326
2427// Executed Command:
25- {{ #each args as |arg |~ }}
28+ {{ #each args as |arg |}}
2629// {{ arg }}
2730{{ /each }}
2831
32+ #![cfg_attr(rustfmt, rustfmt_skip)]
2933#![allow(unused_parens)]
3034#![allow(unused_imports)]
31- #![allow(clippy::unnecessary_cast )]
35+ #![allow(missing_docs )]
3236
33- use frame_support::{
34- traits::Get,
35- weights::{constants::RocksDbWeight, Weight},
36- };
37- use sp_std::marker::PhantomData;
37+ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
38+ use core::marker::PhantomData;
3839
39- use {{ pallet }} ::weights::WeightInfo;
40+ /// Weight functions needed for `{{ pallet }} `.
41+ pub trait WeightInfo {
42+ {{ #each benchmarks as |benchmark |}}
43+ fn {{ benchmark.name ~}}
44+ (
45+ {{ ~#each benchmark.components as |c | ~}}
46+ {{ c.name }} : u32, {{ /each ~}}
47+ ) -> Weight;
48+ {{ /each }}
49+ }
4050
51+ /// Weights for `{{ pallet }} ` using the Basilisk node and recommended hardware.
4152pub struct BasiliskWeight<T >(PhantomData<T >);
42-
53+ {{ #if (eq pallet " frame_system" )}}
54+ impl<T: crate::Config> WeightInfo for BasiliskWeight<T > {
55+ {{ else }}
4356impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T > {
44- {{ #each benchmarks as |benchmark |}}
45- {{ #each benchmark.comments as |comment |}}
46- // {{ comment }}
57+ {{ /if }}
58+ {{ #each benchmarks as |benchmark |}}
59+ {{ #each benchmark.comments as |comment |}}
60+ /// {{ comment }}
4761 {{ /each }}
4862 {{ #each benchmark.component_ranges as |range |}}
4963 /// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
5064 {{ /each }}
51- fn {{ benchmark.name ~}}
52- (
53- {{ ~#each benchmark.components as |c | ~}}
54- {{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
55- ) -> Weight {
56- // Minimum execution time: {{ underscore benchmark.min_execution_time }} nanoseconds.
57- Weight::from_ref_time({{ underscore benchmark.base_weight }} as u64)
58- {{ ~#each benchmark.component_weight as |cw |}}
59- // Standard Error: {{ underscore cw.error }}
60- .saturating_add(Weight::from_ref_time({{ underscore cw.slope }} as u64).saturating_mul({{ cw.name }} as u64))
61- {{ /each }}
62- {{ #if (ne benchmark.base_reads " 0" )}}
63- .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} as u64))
64- {{ /if }}
65- {{ #each benchmark.component_reads as |cr |}}
66- .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} as u64).saturating_mul({{ cr.name }} as u64)))
67- {{ /each }}
68- {{ #if (ne benchmark.base_writes " 0" )}}
69- .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} as u64))
70- {{ /if }}
71- {{ ~#each benchmark.component_writes as |cw |}}
72- .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} as u64).saturating_mul({{ cw.name }} as u64)))
73- {{ /each }}
74- }
75- {{ /each }}
76- }
65+ fn {{ benchmark.name ~}}
66+ (
67+ {{ ~#each benchmark.components as |c | ~}}
68+ {{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
69+ ) -> Weight {
70+ // Proof Size summary in bytes:
71+ // Measured: `{{ benchmark.base_recorded_proof_size }} {{ #each benchmark.component_recorded_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
72+ // Estimated: `{{ benchmark.base_calculated_proof_size }} {{ #each benchmark.component_calculated_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
73+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} _000 picoseconds.
74+ Weight::from_parts({{ underscore benchmark.base_weight }} , {{ benchmark.base_calculated_proof_size }} )
75+ {{ #each benchmark.component_weight as |cw |}}
76+ // Standard Error: {{ underscore cw.error }}
77+ .saturating_add(Weight::from_parts({{ underscore cw.slope }} , 0).saturating_mul({{ cw.name }} .into()))
78+ {{ /each }}
79+ {{ #if (ne benchmark.base_reads " 0" )}}
80+ .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} _u64))
81+ {{ /if }}
82+ {{ #each benchmark.component_reads as |cr |}}
83+ .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} _u64).saturating_mul({{ cr.name }} .into())))
84+ {{ /each }}
85+ {{ #if (ne benchmark.base_writes " 0" )}}
86+ .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} _u64))
87+ {{ /if }}
88+ {{ #each benchmark.component_writes as |cw |}}
89+ .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} _u64).saturating_mul({{ cw.name }} .into())))
90+ {{ /each }}
91+ {{ #each benchmark.component_calculated_proof_size as |cp |}}
92+ .saturating_add(Weight::from_parts(0, {{ cp.slope }} ).saturating_mul({{ cp.name }} .into()))
93+ {{ /each }}
94+ }
95+ {{ /each }}
96+ }
0 commit comments