git.delta.rocks / unique-network / refs/commits / c1336b37b0b5

difftreelog

build update frame-weight-template

Daniel Shiposha2022-10-03parent: #b88274c.patch.diff
in: master

1 file changed

modified.maintain/frame-weight-template.hbsdiffbeforeafterboth
47 {{~#each benchmark.components as |c| ~}}47 {{~#each benchmark.components as |c| ~}}
48 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}48 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
49 ) -> Weight {49 ) -> Weight {
50 ({{underscore benchmark.base_weight}} as Weight)50 Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
51 {{#each benchmark.component_weight as |cw|}}51 {{#each benchmark.component_weight as |cw|}}
52 // Standard Error: {{underscore cw.error}}52 // Standard Error: {{underscore cw.error}}
53 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))53 .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
54 {{/each}}54 {{/each}}
55 {{#if (ne benchmark.base_reads "0")}}55 {{#if (ne benchmark.base_reads "0")}}
56 .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))56 .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
57 {{/if}}57 {{/if}}
58 {{#each benchmark.component_reads as |cr|}}58 {{#each benchmark.component_reads as |cr|}}
59 .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))59 .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
60 {{/each}}60 {{/each}}
61 {{#if (ne benchmark.base_writes "0")}}61 {{#if (ne benchmark.base_writes "0")}}
62 .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))62 .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
63 {{/if}}63 {{/if}}
64 {{#each benchmark.component_writes as |cw|}}64 {{#each benchmark.component_writes as |cw|}}
65 .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))65 .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
66 {{/each}}66 {{/each}}
67 }67 }
68 {{/each}}68 {{/each}}
79 {{~#each benchmark.components as |c| ~}}79 {{~#each benchmark.components as |c| ~}}
80 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}80 {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
81 ) -> Weight {81 ) -> Weight {
82 ({{underscore benchmark.base_weight}} as Weight)82 Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
83 {{#each benchmark.component_weight as |cw|}}83 {{#each benchmark.component_weight as |cw|}}
84 // Standard Error: {{underscore cw.error}}84 // Standard Error: {{underscore cw.error}}
85 .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))85 .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
86 {{/each}}86 {{/each}}
87 {{#if (ne benchmark.base_reads "0")}}87 {{#if (ne benchmark.base_reads "0")}}
88 .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))88 .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64))
89 {{/if}}89 {{/if}}
90 {{#each benchmark.component_reads as |cr|}}90 {{#each benchmark.component_reads as |cr|}}
91 .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))91 .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
92 {{/each}}92 {{/each}}
93 {{#if (ne benchmark.base_writes "0")}}93 {{#if (ne benchmark.base_writes "0")}}
94 .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))94 .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as u64))
95 {{/if}}95 {{/if}}
96 {{#each benchmark.component_writes as |cw|}}96 {{#each benchmark.component_writes as |cw|}}
97 .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))97 .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
98 {{/each}}98 {{/each}}
99 }99 }
100 {{/each}}100 {{/each}}