-
Notifications
You must be signed in to change notification settings - Fork 382
Enable benchmarks for pallet_xcm_benchmarks #3330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TarekkMA
wants to merge
16
commits into
master
Choose a base branch
from
tarekkma/xcm-fungible-benchmarks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7ce8a70
Enable benchmarks for pallet_xcm_benchmarks and fix all issues with `…
TarekkMA 6af17ba
Cleanup AccountIdConverter
TarekkMA 30d3840
Use `MaxAssetsIntoHolding` in `worst_case_holding`
TarekkMA 6838bb8
Increase worst_case_for_trader
TarekkMA dc572f9
Use new template for xcm weights
TarekkMA 9f28066
Fix all issues with benchmarks
TarekkMA 477ff27
use new benchmarks weights
TarekkMA 26b51e5
Merge remote-tracking branch 'origin/master' into tarekkma/xcm-fungib…
TarekkMA 4fb2a5d
Fix failing tests
TarekkMA e9a2505
clarify refund_weight impl var names
librelois 71ddf78
fix xcm-weight-trader
TarekkMA 67b8e1b
fix tests
TarekkMA 3f9d307
fix tests
TarekkMA c4fb5d6
fmt
TarekkMA 22fb227
allow dead code inside generated xcm weights
TarekkMA 788477b
fmt
TarekkMA 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| {{header}} | ||
| //! Autogenerated weights for `{{pallet}}` | ||
| //! | ||
| //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} | ||
| //! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` | ||
| //! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}` | ||
| //! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}` | ||
| //! WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} | ||
|
|
||
| // Executed Command: | ||
| {{#each args as |arg|}} | ||
| // {{arg}} | ||
| {{/each}} | ||
|
|
||
| #![cfg_attr(rustfmt, rustfmt_skip)] | ||
| #![allow(unused_parens)] | ||
| #![allow(unused_imports)] | ||
|
|
||
| use frame_support::{traits::Get, weights::Weight}; | ||
| use core::marker::PhantomData; | ||
|
|
||
| /// Weight functions for `{{pallet}}`. | ||
| pub struct WeightInfo<T>(PhantomData<T>); | ||
| impl<T: frame_system::Config> WeightInfo<T> { | ||
| {{#each benchmarks as |benchmark|}} | ||
| {{#each benchmark.comments as |comment|}} | ||
| /// {{comment}} | ||
| {{/each}} | ||
| {{#each benchmark.component_ranges as |range|}} | ||
| /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. | ||
| {{/each}} | ||
| pub(crate) fn {{benchmark.name~}} | ||
| ( | ||
| {{~#each benchmark.components as |c| ~}} | ||
| {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} | ||
| ) -> Weight { | ||
| // 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}}_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_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}})) | ||
| {{/if}} | ||
| {{#each benchmark.component_reads as |cr|}} | ||
| .saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) | ||
| {{/each}} | ||
| {{#if (ne benchmark.base_writes "0")}} | ||
| .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) | ||
| {{/if}} | ||
| {{#each benchmark.component_writes as |cw|}} | ||
| .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_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) | ||
| {{/each}} | ||
| } | ||
| {{/each}} | ||
| } |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.