1
1
{{ header }}
2
- //! Autogenerated weights for {{ pallet }}
2
+ //! Autogenerated weights for ` {{ pallet }} `
3
3
//!
4
4
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{ version }}
5
- //! DATE: {{ date }} , STEPS: `{{ cmd.steps }} `, REPEAT: {{ cmd.repeat }} , LOW RANGE: `{{ cmd.lowest_range_values }} `, HIGH RANGE: `{{ cmd.highest_range_values }} `
5
+ //! DATE: {{ date }} , STEPS: `{{ cmd.steps }} `, REPEAT: `{{ cmd.repeat }} `, LOW RANGE: `{{ cmd.lowest_range_values }} `, HIGH RANGE: `{{ cmd.highest_range_values }} `
6
+ //! WORST CASE MAP SIZE: `{{ cmd.worst_case_map_values }} `
6
7
//! HOSTNAME: `{{ hostname }} `, CPU: `{{ cpuname }} `
7
- //! EXECUTION: {{ cmd.execution }} , WASM-EXECUTION: {{ cmd.wasm_execution }} , CHAIN: {{ cmd.chain }} , DB CACHE: {{ cmd.db_cache }}
8
+ //! WASM-EXECUTION: ` {{ cmd.wasm_execution }} ` , CHAIN: ` {{ cmd.chain }} ` , DB CACHE: ` {{ cmd.db_cache }} `
8
9
9
10
// Executed Command:
10
11
{{ #each args as |arg |}}
14
15
#![cfg_attr(rustfmt, rustfmt_skip)]
15
16
#![allow(unused_parens)]
16
17
#![allow(unused_imports)]
18
+ #![allow(missing_docs)]
17
19
18
20
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
19
- use sp_std ::marker::PhantomData;
21
+ use core ::marker::PhantomData;
20
22
21
- /// Weight functions needed for {{ pallet }} .
23
+ /// Weight functions needed for ` {{ pallet }} ` .
22
24
pub trait WeightInfo {
23
25
{{ #each benchmarks as |benchmark |}}
24
26
fn {{ benchmark.name ~}}
@@ -29,7 +31,7 @@ pub trait WeightInfo {
29
31
{{ /each }}
30
32
}
31
33
32
- /// Weights for {{ pallet }} using the Substrate node and recommended hardware.
34
+ /// Weights for ` {{ pallet }} ` using the Substrate node and recommended hardware.
33
35
pub struct SubstrateWeight<T >(PhantomData<T >);
34
36
{{ #if (eq pallet " frame_system" )}}
35
37
impl<T: crate::Config> WeightInfo for SubstrateWeight<T > {
@@ -38,7 +40,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
38
40
{{ /if }}
39
41
{{ #each benchmarks as |benchmark |}}
40
42
{{ #each benchmark.comments as |comment |}}
41
- // {{ comment }}
43
+ /// {{ comment }}
42
44
{{ /each }}
43
45
{{ #each benchmark.component_ranges as |range |}}
44
46
/// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
@@ -48,33 +50,39 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
48
50
{{ ~#each benchmark.components as |c | ~}}
49
51
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
50
52
) -> Weight {
51
- // Minimum execution time: {{ underscore benchmark.min_execution_time }} nanoseconds.
52
- Weight::from_ref_time({{ underscore benchmark.base_weight }} )
53
+ // Proof Size summary in bytes:
54
+ // Measured: `{{ benchmark.base_recorded_proof_size }} {{ #each benchmark.component_recorded_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
55
+ // Estimated: `{{ benchmark.base_calculated_proof_size }} {{ #each benchmark.component_calculated_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
56
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} _000 picoseconds.
57
+ Weight::from_parts({{ underscore benchmark.base_weight }} , {{ benchmark.base_calculated_proof_size }} )
53
58
{{ #each benchmark.component_weight as |cw |}}
54
59
// Standard Error: {{ underscore cw.error }}
55
- .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} ).saturating_mul({{ cw.name }} .into()))
60
+ .saturating_add(Weight::from_parts ({{ underscore cw.slope }} , 0 ).saturating_mul({{ cw.name }} .into()))
56
61
{{ /each }}
57
62
{{ #if (ne benchmark.base_reads " 0" )}}
58
- .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} ))
63
+ .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} _u64 ))
59
64
{{ /if }}
60
65
{{ #each benchmark.component_reads as |cr |}}
61
66
.saturating_add(T::DbWeight::get().reads(({{ cr.slope }} _u64).saturating_mul({{ cr.name }} .into())))
62
67
{{ /each }}
63
68
{{ #if (ne benchmark.base_writes " 0" )}}
64
- .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} ))
69
+ .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} _u64 ))
65
70
{{ /if }}
66
71
{{ #each benchmark.component_writes as |cw |}}
67
72
.saturating_add(T::DbWeight::get().writes(({{ cw.slope }} _u64).saturating_mul({{ cw.name }} .into())))
68
73
{{ /each }}
74
+ {{ #each benchmark.component_calculated_proof_size as |cp |}}
75
+ .saturating_add(Weight::from_parts(0, {{ cp.slope }} ).saturating_mul({{ cp.name }} .into()))
76
+ {{ /each }}
69
77
}
70
78
{{ /each }}
71
79
}
72
80
73
- // For backwards compatibility and tests
81
+ // For backwards compatibility and tests.
74
82
impl WeightInfo for () {
75
83
{{ #each benchmarks as |benchmark |}}
76
84
{{ #each benchmark.comments as |comment |}}
77
- // {{ comment }}
85
+ /// {{ comment }}
78
86
{{ /each }}
79
87
{{ #each benchmark.component_ranges as |range |}}
80
88
/// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
@@ -84,24 +92,30 @@ impl WeightInfo for () {
84
92
{{ ~#each benchmark.components as |c | ~}}
85
93
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
86
94
) -> Weight {
87
- // Minimum execution time: {{ underscore benchmark.min_execution_time }} nanoseconds.
88
- Weight::from_ref_time({{ underscore benchmark.base_weight }} )
95
+ // Proof Size summary in bytes:
96
+ // Measured: `{{ benchmark.base_recorded_proof_size }} {{ #each benchmark.component_recorded_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
97
+ // Estimated: `{{ benchmark.base_calculated_proof_size }} {{ #each benchmark.component_calculated_proof_size as |cp |}} + {{ cp.name }} * ({{ cp.slope }} ±{{ underscore cp.error }} ){{ /each }} `
98
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} _000 picoseconds.
99
+ Weight::from_parts({{ underscore benchmark.base_weight }} , {{ benchmark.base_calculated_proof_size }} )
89
100
{{ #each benchmark.component_weight as |cw |}}
90
101
// Standard Error: {{ underscore cw.error }}
91
- .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} ).saturating_mul({{ cw.name }} .into()))
102
+ .saturating_add(Weight::from_parts ({{ underscore cw.slope }} , 0 ).saturating_mul({{ cw.name }} .into()))
92
103
{{ /each }}
93
104
{{ #if (ne benchmark.base_reads " 0" )}}
94
- .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} ))
105
+ .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} _u64 ))
95
106
{{ /if }}
96
107
{{ #each benchmark.component_reads as |cr |}}
97
108
.saturating_add(RocksDbWeight::get().reads(({{ cr.slope }} _u64).saturating_mul({{ cr.name }} .into())))
98
109
{{ /each }}
99
110
{{ #if (ne benchmark.base_writes " 0" )}}
100
- .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} ))
111
+ .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} _u64 ))
101
112
{{ /if }}
102
113
{{ #each benchmark.component_writes as |cw |}}
103
114
.saturating_add(RocksDbWeight::get().writes(({{ cw.slope }} _u64).saturating_mul({{ cw.name }} .into())))
104
115
{{ /each }}
116
+ {{ #each benchmark.component_calculated_proof_size as |cp |}}
117
+ .saturating_add(Weight::from_parts(0, {{ cp.slope }} ).saturating_mul({{ cp.name }} .into()))
118
+ {{ /each }}
105
119
}
106
120
{{ /each }}
107
121
}
0 commit comments