18
18
//! Autogenerated weights for {{ pallet }}
19
19
//!
20
20
//! 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 }} `
21
+ //! DATE: {{ date }} , STEPS: `{{ cmd.steps }} `, REPEAT: `{{ cmd.repeat }} `, LOW RANGE: `{{ cmd.lowest_range_values }} `, HIGH RANGE: `{{ cmd.highest_range_values }} `
22
+ //! WORST CASE MAP SIZE: `{{ cmd.worst_case_map_values }} `
23
+ //! HOSTNAME: `{{ hostname }} `, CPU: `{{ cpuname }} `
22
24
//! EXECUTION: {{ cmd.execution }} , WASM-EXECUTION: {{ cmd.wasm_execution }} , CHAIN: {{ cmd.chain }} , DB CACHE: {{ cmd.db_cache }}
23
25
24
26
// Executed Command:
27
29
{{ /each }}
28
30
29
31
#![cfg_attr(rustfmt, rustfmt_skip)]
30
- #![allow(
31
- rustdoc::all,
32
- missing_docs,
33
- unused_parens,
34
- unused_imports
35
- )]
32
+ #![allow(unused_parens)]
33
+ #![allow(unused_imports)]
34
+ #![allow(missing_docs)]
36
35
37
36
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
38
- use sp_std ::marker::PhantomData;
37
+ use core ::marker::PhantomData;
39
38
40
39
/// Weight functions needed for {{ pallet }} .
41
40
pub trait WeightInfo {
@@ -57,29 +56,39 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
57
56
{{ /if }}
58
57
{{ #each benchmarks as |benchmark |}}
59
58
{{ #each benchmark.comments as |comment |}}
60
- // {{ comment }}
59
+ /// {{ comment }}
60
+ {{ /each }}
61
+ {{ #each benchmark.component_ranges as |range |}}
62
+ /// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
61
63
{{ /each }}
62
64
fn {{ benchmark.name ~}}
63
65
(
64
66
{{ ~#each benchmark.components as |c | ~}}
65
67
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
66
68
) -> Weight {
67
- Weight::from_ref_time({{ underscore benchmark.base_weight }} as u64)
69
+ // Proof Size summary in bytes:
70
+ // Measured: `{{ benchmark.base_recorded_proof_size }} {{ #each benchmark.component_recorded_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
71
+ // Estimated: `{{ benchmark.base_calculated_proof_size }} {{ #each benchmark.component_calculated_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
72
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} _000 picoseconds.
73
+ Weight::from_parts({{ underscore benchmark.base_weight }} , {{ benchmark.base_calculated_proof_size }} )
68
74
{{ #each benchmark.component_weight as |cw |}}
69
75
// Standard Error: {{ underscore cw.error }}
70
- .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} as u64 ).saturating_mul({{ cw.name }} as u64 ))
76
+ .saturating_add(Weight::from_parts ({{ underscore cw.slope }} , 0 ).saturating_mul({{ cw.name }} .into() ))
71
77
{{ /each }}
72
78
{{ #if (ne benchmark.base_reads " 0" )}}
73
- .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} as u64 ))
79
+ .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} _u64 ))
74
80
{{ /if }}
75
81
{{ #each benchmark.component_reads as |cr |}}
76
- .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} as u64 ).saturating_mul({{ cr.name }} as u64 )))
82
+ .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} _u64 ).saturating_mul({{ cr.name }} .into() )))
77
83
{{ /each }}
78
84
{{ #if (ne benchmark.base_writes " 0" )}}
79
- .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} as u64 ))
85
+ .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} _u64 ))
80
86
{{ /if }}
81
87
{{ #each benchmark.component_writes as |cw |}}
82
- .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} as u64).saturating_mul({{ cw.name }} as u64)))
88
+ .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} _u64).saturating_mul({{ cw.name }} .into())))
89
+ {{ /each }}
90
+ {{ #each benchmark.component_calculated_proof_size as |cp |}}
91
+ .saturating_add(Weight::from_parts(0, {{ cp.slope }} ).saturating_mul({{ cp.name }} .into()))
83
92
{{ /each }}
84
93
}
85
94
{{ /each }}
@@ -89,29 +98,39 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
89
98
impl WeightInfo for () {
90
99
{{ #each benchmarks as |benchmark |}}
91
100
{{ #each benchmark.comments as |comment |}}
92
- // {{ comment }}
101
+ /// {{ comment }}
102
+ {{ /each }}
103
+ {{ #each benchmark.component_ranges as |range |}}
104
+ /// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
93
105
{{ /each }}
94
106
fn {{ benchmark.name ~}}
95
107
(
96
108
{{ ~#each benchmark.components as |c | ~}}
97
109
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
98
110
) -> Weight {
99
- Weight::from_ref_time({{ underscore benchmark.base_weight }} as u64)
111
+ // Proof Size summary in bytes:
112
+ // Measured: `{{ benchmark.base_recorded_proof_size }} {{ #each benchmark.component_recorded_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
113
+ // Estimated: `{{ benchmark.base_calculated_proof_size }} {{ #each benchmark.component_calculated_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
114
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} _000 picoseconds.
115
+ Weight::from_parts({{ underscore benchmark.base_weight }} , {{ benchmark.base_calculated_proof_size }} )
100
116
{{ #each benchmark.component_weight as |cw |}}
101
117
// Standard Error: {{ underscore cw.error }}
102
- .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} as u64 ).saturating_mul({{ cw.name }} as u64 ))
118
+ .saturating_add(Weight::from_parts ({{ underscore cw.slope }} , 0 ).saturating_mul({{ cw.name }} .into() ))
103
119
{{ /each }}
104
120
{{ #if (ne benchmark.base_reads " 0" )}}
105
- .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} as u64 ))
121
+ .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} _u64 ))
106
122
{{ /if }}
107
123
{{ #each benchmark.component_reads as |cr |}}
108
- .saturating_add(RocksDbWeight::get().reads(({{ cr.slope }} as u64 ).saturating_mul({{ cr.name }} as u64 )))
124
+ .saturating_add(RocksDbWeight::get().reads(({{ cr.slope }} _u64 ).saturating_mul({{ cr.name }} .into() )))
109
125
{{ /each }}
110
126
{{ #if (ne benchmark.base_writes " 0" )}}
111
- .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} as u64 ))
127
+ .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} _u64 ))
112
128
{{ /if }}
113
129
{{ #each benchmark.component_writes as |cw |}}
114
- .saturating_add(RocksDbWeight::get().writes(({{ cw.slope }} as u64).saturating_mul({{ cw.name }} as u64)))
130
+ .saturating_add(RocksDbWeight::get().writes(({{ cw.slope }} _u64).saturating_mul({{ cw.name }} .into())))
131
+ {{ /each }}
132
+ {{ #each benchmark.component_calculated_proof_size as |cp |}}
133
+ .saturating_add(Weight::from_parts(0, {{ cp.slope }} ).saturating_mul({{ cp.name }} .into()))
115
134
{{ /each }}
116
135
}
117
136
{{ /each }}
0 commit comments