This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Deprecate Weight::from_{ref_time, proof_size}
#13475
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bf9882e
Deprecate Weight::from_{ref_time, proof_size}
ggwpez e013e30
Update templates
ggwpez 8c4be73
Use from_parts
ggwpez bcd5415
Use from_parts
ggwpez a6be787
Dont revert comment :facepalm:
ggwpez 6d674f1
Merge branch 'master' of https://github.com/paritytech/substrate into…
8f24cca
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
422b685
Update weight files
ggwpez 991fd01
More fixes
ggwpez 3143cb9
Merge remote-tracking branch 'origin/master' into oty-deprecate-weigh…
ggwpez 9983c41
Adapt to Master changes
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { | |
// Proof Size summary in bytes: | ||
// 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. | ||
Weight::from_ref_time({{underscore benchmark.base_weight}}) | ||
.saturating_add(Weight::from_proof_size({{benchmark.base_calculated_proof_size}})) | ||
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds. | ||
Weight::from_parts({{underscore benchmark.base_weight}}, {{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())) | ||
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into())) | ||
{{/each}} | ||
{{#if (ne benchmark.base_reads "0")}} | ||
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64)) | ||
|
@@ -72,7 +71,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { | |
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) | ||
{{/each}} | ||
{{#each benchmark.component_calculated_proof_size as |cp|}} | ||
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into())) | ||
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same - why 0 for ref time? |
||
{{/each}} | ||
} | ||
{{/each}} | ||
|
@@ -95,12 +94,11 @@ impl WeightInfo for () { | |
// Proof Size summary in bytes: | ||
// 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. | ||
Weight::from_ref_time({{underscore benchmark.base_weight}}) | ||
.saturating_add(Weight::from_proof_size({{benchmark.base_calculated_proof_size}})) | ||
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds. | ||
Weight::from_parts({{underscore benchmark.base_weight}}, {{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())) | ||
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into())) | ||
{{/each}} | ||
{{#if (ne benchmark.base_reads "0")}} | ||
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64)) | ||
|
@@ -115,7 +113,7 @@ impl WeightInfo for () { | |
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) | ||
{{/each}} | ||
{{#each benchmark.component_calculated_proof_size as |cp|}} | ||
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into())) | ||
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) | ||
{{/each}} | ||
} | ||
{{/each}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we ever using 0 for proof size?