mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Improve Weight Template and API (#13355)
* improve weights template and api * follow template
This commit is contained in:
@@ -38,11 +38,8 @@ impl<T: frame_system::Config> {{pallet}}::WeightInfo for WeightInfo<T> {
|
||||
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
|
||||
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
|
||||
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
|
||||
{{#if (ne benchmark.base_calculated_proof_size "0")}}
|
||||
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
|
||||
{{else}}
|
||||
Weight::from_ref_time({{underscore benchmark.base_weight}})
|
||||
{{/if}}
|
||||
.saturating_add(Weight::from_proof_size({{benchmark.base_calculated_proof_size}}))
|
||||
{{#each benchmark.component_weight as |cw|}}
|
||||
// Standard Error: {{underscore cw.error}}
|
||||
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
|
||||
|
||||
Reference in New Issue
Block a user