Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix XCM Teleport Benchmark #4146

Merged
merged 6 commits into from
Oct 27, 2021
Merged

Fix XCM Teleport Benchmark #4146

merged 6 commits into from
Oct 27, 2021

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented Oct 25, 2021

In the previous benchmark, we weren't populating the CheckedAccount, and thus we failed the can_check_in check when a CheckedAccount is used.

This fixes that by populating the account with plenty of funds to pass the benchmark.

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Oct 25, 2021
@shawntabrizi
Copy link
Member Author

/benchmark xcm westend pallet_xcm_benchmarks::fungible

@parity-benchapp
Copy link

parity-benchapp bot commented Oct 25, 2021

Benchmark Westend XCM for branch "shawntabrizi-fix-xcm-benchmark" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Results
2021-10-25 18:30:33 [0] 💸 generated 1 npos voters, 1 from validators and 0 nominators    
2021-10-25 18:30:33 Took active validators from set with wrong size    
2021-10-25 18:30:33 Took active validators from set with wrong size.    
2021-10-25 18:30:33 Took active validators from set with wrong size    
Error: 
   0: �[91mInvalid input: An overflow would occur�[0m

Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

ERROR: Unable to commit file ./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

@paritytech paritytech deleted a comment from parity-benchapp bot Oct 25, 2021
@paritytech paritytech deleted a comment from parity-benchapp bot Oct 25, 2021
@shawntabrizi
Copy link
Member Author

/benchmark xcm westend pallet_xcm_benchmarks::fungible

@parity-benchapp
Copy link

parity-benchapp bot commented Oct 25, 2021

Benchmark Westend XCM for branch "shawntabrizi-fix-xcm-benchmark" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Results
Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "withdraw_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    43.03
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    43.03
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "transfer_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    69.22
              µs

Reads = 2
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    69.22
              µs

Reads = 2
Writes = 2

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "transfer_reserve_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    100.1
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    100.1
              µs

Reads = 7
Writes = 5

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "receive_teleported_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.73
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.73
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "deposit_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    51.52
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    51.52
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "deposit_reserve_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     84.3
              µs

Reads = 6
Writes = 4

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=     84.3
              µs

Reads = 6
Writes = 4

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "initiate_teleport", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    83.69
              µs

Reads = 6
Writes = 4

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    83.69
              µs

Reads = 6
Writes = 4


Parity Bot and others added 2 commits October 25, 2021 20:40
…k --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
@shawntabrizi shawntabrizi added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. B7-runtimenoteworthy and removed B0-silent Changes should not be mentioned in any release notes labels Oct 25, 2021
@shawntabrizi
Copy link
Member Author

/benchmark xcm westend pallet_xcm_benchmarks::fungible

@parity-benchapp
Copy link

parity-benchapp bot commented Oct 25, 2021

Benchmark Westend XCM for branch "shawntabrizi-fix-xcm-benchmark" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Results
Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "withdraw_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     43.8
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=     43.8
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "transfer_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    68.07
              µs

Reads = 2
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    68.07
              µs

Reads = 2
Writes = 2

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "transfer_reserve_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:2 w:2)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    99.63
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    99.63
              µs

Reads = 7
Writes = 5

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "receive_teleported_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    38.67
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    38.67
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "deposit_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    51.79
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    51.79
              µs

Reads = 1
Writes = 1

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "deposit_reserve_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    85.78
              µs

Reads = 6
Writes = 4

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    85.78
              µs

Reads = 6
Writes = 4

Pallet: "pallet_xcm_benchmarks::fungible", Extrinsic: "initiate_teleport", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: System Account (r:1 w:1)
Storage: XcmPallet SupportedVersion (r:1 w:0)
Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
Storage: XcmPallet SafeXcmVersion (r:1 w:0)
Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Storage: Dmp DownwardMessageQueues (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    84.87
              µs

Reads = 6
Writes = 4

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    84.87
              µs

Reads = 6
Writes = 4


…k --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
@gavofyork gavofyork merged commit 9eb990d into master Oct 27, 2021
@gavofyork gavofyork deleted the shawntabrizi-fix-xcm-benchmark branch October 27, 2021 13:13
ordian added a commit that referenced this pull request Oct 27, 2021
* master: (73 commits)
  Fix XCM Teleport Benchmark (#4146)
  Allow Queries and Subscriptions (#4150)
  Fix weights on hard-coded XCM fragments (#4144)
  Bump spec versions (#4142)
  Bump libc from 0.2.104 to 0.2.105 (#4141)
  Enable bags-list pallet in polkadot (#4080)
  Move artifacts states into memory in PVF validation host (#3907)
  Introduce new Runtime API endpoint for fetching the validation data (#3728)
  export xcm_pallet config (#4116)
  Apply cargo fmt (#4122)
  remove logging from the check-dependent-* job (#4120)
  Remove stale migrations (#4107)
  Bump structopt from 0.3.23 to 0.3.25 (#4098)
  remove hardcoded pipeline scripts tag (#4109)
  Bump libc from 0.2.103 to 0.2.104 (#4099)
  some spelling fixes (#4088)
  polkadot: remove call filters on registrar pallets (#4093)
  Fix typos in docs (#4092)
  Rename Statemint where appropriate (#4087)
  bump substrate (#4091)
  ...
drahnr pushed a commit that referenced this pull request Oct 27, 2021
* fix xcm benchmark

* fix overflow

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

* fix spelling

* fmt

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Co-authored-by: Parity Bot <admin@parity.io>
emostov pushed a commit that referenced this pull request Nov 1, 2021
* fix xcm benchmark

* fix overflow

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

* fix spelling

* fmt

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Co-authored-by: Parity Bot <admin@parity.io>
@viniul viniul added D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. and removed D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants