19
19
//!
20
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{ version }}
21
21
//! DATE: {{ date }} , STEPS: `{{ cmd.steps }} `, REPEAT: {{ cmd.repeat }} , LOW RANGE: `{{ cmd.lowest_range_values }} `, HIGH RANGE: `{{ cmd.highest_range_values }} `
22
+ //! HOSTNAME: `{{ hostname }} `, CPU: `{{ cpuname }} `
22
23
//! EXECUTION: {{ cmd.execution }} , WASM-EXECUTION: {{ cmd.wasm_execution }} , CHAIN: {{ cmd.chain }} , DB CACHE: {{ cmd.db_cache }}
23
24
24
25
// Executed Command:
@@ -55,27 +56,31 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
55
56
{{ #each benchmark.comments as |comment |}}
56
57
// {{ comment }}
57
58
{{ /each }}
59
+ {{ #each benchmark.component_ranges as |range |}}
60
+ /// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
61
+ {{ /each }}
58
62
fn {{ benchmark.name ~}}
59
63
(
60
64
{{ ~#each benchmark.components as |c | ~}}
61
65
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
62
66
) -> Weight {
63
- ({{ underscore benchmark.base_weight }} as Weight)
67
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} nanoseconds.
68
+ Weight::from_ref_time({{ underscore benchmark.base_weight }} )
64
69
{{ #each benchmark.component_weight as |cw |}}
65
70
// Standard Error: {{ underscore cw.error }}
66
- .saturating_add(({{ underscore cw.slope }} as Weight ).saturating_mul({{ cw.name }} as Weight ))
71
+ .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} ).saturating_mul({{ cw.name }} .into() ))
67
72
{{ /each }}
68
73
{{ #if (ne benchmark.base_reads " 0" )}}
69
- .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} as Weight ))
74
+ .saturating_add(T::DbWeight::get().reads({{ benchmark.base_reads }} ))
70
75
{{ /if }}
71
76
{{ #each benchmark.component_reads as |cr |}}
72
- .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} as Weight ).saturating_mul({{ cr.name }} as Weight )))
77
+ .saturating_add(T::DbWeight::get().reads(({{ cr.slope }} _u64 ).saturating_mul({{ cr.name }} .into() )))
73
78
{{ /each }}
74
79
{{ #if (ne benchmark.base_writes " 0" )}}
75
- .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} as Weight ))
80
+ .saturating_add(T::DbWeight::get().writes({{ benchmark.base_writes }} ))
76
81
{{ /if }}
77
82
{{ #each benchmark.component_writes as |cw |}}
78
- .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} as Weight ).saturating_mul({{ cw.name }} as Weight )))
83
+ .saturating_add(T::DbWeight::get().writes(({{ cw.slope }} _u64 ).saturating_mul({{ cw.name }} .into() )))
79
84
{{ /each }}
80
85
}
81
86
{{ /each }}
@@ -87,28 +92,34 @@ impl WeightInfo for () {
87
92
{{ #each benchmark.comments as |comment |}}
88
93
// {{ comment }}
89
94
{{ /each }}
95
+ {{ #each benchmark.component_ranges as |range |}}
96
+ /// The range of component `{{ range.name }} ` is `[{{ range.min }} , {{ range.max }} ]`.
97
+ {{ /each }}
90
98
fn {{ benchmark.name ~}}
91
99
(
92
100
{{ ~#each benchmark.components as |c | ~}}
93
101
{{ ~#if (not c.is_used )}} _{{ /if }} {{ c.name }} : u32, {{ /each ~}}
94
102
) -> Weight {
95
- ({{ underscore benchmark.base_weight }} as Weight)
103
+ // Minimum execution time: {{ underscore benchmark.min_execution_time }} nanoseconds.
104
+ Weight::from_ref_time({{ underscore benchmark.base_weight }} )
96
105
{{ #each benchmark.component_weight as |cw |}}
97
106
// Standard Error: {{ underscore cw.error }}
98
- .saturating_add(({{ underscore cw.slope }} as Weight ).saturating_mul({{ cw.name }} as Weight ))
107
+ .saturating_add(Weight::from_ref_time ({{ underscore cw.slope }} ).saturating_mul({{ cw.name }} .into() ))
99
108
{{ /each }}
100
109
{{ #if (ne benchmark.base_reads " 0" )}}
101
- .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} as Weight ))
110
+ .saturating_add(RocksDbWeight::get().reads({{ benchmark.base_reads }} ))
102
111
{{ /if }}
103
112
{{ #each benchmark.component_reads as |cr |}}
104
- .saturating_add(RocksDbWeight::get().reads(({{ cr.slope }} as Weight ).saturating_mul({{ cr.name }} as Weight )))
113
+ .saturating_add(RocksDbWeight::get().reads(({{ cr.slope }} _u64 ).saturating_mul({{ cr.name }} .into() )))
105
114
{{ /each }}
106
115
{{ #if (ne benchmark.base_writes " 0" )}}
107
- .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} as Weight ))
116
+ .saturating_add(RocksDbWeight::get().writes({{ benchmark.base_writes }} ))
108
117
{{ /if }}
109
118
{{ #each benchmark.component_writes as |cw |}}
110
- .saturating_add(RocksDbWeight::get().writes(({{ cw.slope }} as Weight ).saturating_mul({{ cw.name }} as Weight )))
119
+ .saturating_add(RocksDbWeight::get().writes(({{ cw.slope }} _u64 ).saturating_mul({{ cw.name }} .into() )))
111
120
{{ /each }}
112
121
}
113
122
{{ /each }}
114
123
}
124
+
125
+
0 commit comments