diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b611fdf8918..2762a0a06d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,7 +84,7 @@ variables: #### stage: test -test-linux-stable: +.test-linux-stable: stage: test <<: *docker-env <<: *common-refs @@ -95,7 +95,7 @@ test-linux-stable: script: - time cargo test --all --release --locked -- --include-ignored -check-runtime-benchmarks: +.check-runtime-benchmarks: stage: test <<: *docker-env <<: *common-refs @@ -105,7 +105,7 @@ check-runtime-benchmarks: # Check that parachain-template will compile with `runtime-benchmarks` feature flag. - time cargo check -p parachain-template-node --features runtime-benchmarks -cargo-check-try-runtime: +.cargo-check-try-runtime: stage: test <<: *docker-env <<: *common-refs @@ -119,7 +119,7 @@ cargo-check-try-runtime: # Check that parachain-template will compile with `try-runtime` feature flag. - time cargo check -p parachain-template-node --features try-runtime -check-rustdoc: +.check-rustdoc: stage: test <<: *docker-env <<: *common-refs @@ -129,7 +129,7 @@ check-rustdoc: script: - time cargo +nightly doc --workspace --all-features --verbose --no-deps -cargo-check-benches: +.cargo-check-benches: stage: test <<: *docker-env <<: *common-refs @@ -142,7 +142,7 @@ cargo-check-benches: #### stage: build -build-linux-stable: +.build-linux-stable: stage: build <<: *docker-env <<: *collect-artifacts @@ -163,7 +163,7 @@ build-linux-stable: - echo "___The VERSION is either a tag name or the curent branch if triggered not by a tag___" - echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION -build-test-parachain: +.build-test-parachain: stage: build <<: *docker-env <<: *collect-artifacts @@ -207,7 +207,7 @@ build-test-parachain: after_script: - buildah logout --all -build-push-image-polkadot-parachain-debug: +.build-push-image-polkadot-parachain-debug: stage: publish <<: *kubernetes-env <<: *common-refs @@ -220,7 +220,7 @@ build-push-image-polkadot-parachain-debug: IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug" VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" -build-push-image-test-parachain: +.build-push-image-test-parachain: stage: publish <<: *kubernetes-env <<: *common-refs @@ -233,7 +233,7 @@ build-push-image-test-parachain: IMAGE_NAME: "docker.io/paritypr/test-parachain" VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" -publish-s3: +.publish-s3: stage: publish <<: *kubernetes-env image: paritytech/awscli:latest @@ -265,21 +265,21 @@ benchmarks-build: <<: *benchmarks-manual-refs script: - time cargo build --profile production --locked --features runtime-benchmarks - - mkdir artifacts + - mkdir -p artifacts - cp target/production/polkadot-parachain ./artifacts/ -benchmarks: +.benchmarks-statemint: stage: benchmarks-run before_script: - *rust-info-script <<: *collect-artifacts <<: *benchmarks-refs script: - - ./scripts/benchmarks-ci.sh assets statemine - - ./scripts/benchmarks-ci.sh assets statemint - - ./scripts/benchmarks-ci.sh assets westmint + - ./scripts/benchmarks-ci.sh assets statemine ./artifacts + - ./scripts/benchmarks-ci.sh assets statemint ./artifacts + - ./scripts/benchmarks-ci.sh assets westmint ./artifacts - git status - - export BRANCHNAME="weights-${CI_COMMIT_BRANCH}" + - export BRANCHNAME="weights-statemint-${CI_COMMIT_BRANCH}" # Set git config - rm -rf .git/config - git config --global user.email "${GITHUB_EMAIL}" @@ -293,14 +293,44 @@ benchmarks: - git push origin $BRANCHNAME # create PR - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} - -d '{"title":"[benchmarks] Update weights","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}' + -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}' -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls after_script: - rm -rf .git/config tags: - weights -publish-benchmarks-s3: +benchmarks-collectives: + stage: benchmarks-run + before_script: + - *rust-info-script + <<: *collect-artifacts + <<: *benchmarks-refs + script: + - ./scripts/benchmarks-ci.sh collectives collectives-polkadot ./artifacts + - git status + - export BRANCHNAME="weights-collectives-${CI_COMMIT_BRANCH}" + # Set git config + - rm -rf .git/config + - git config --global user.email "${GITHUB_EMAIL}" + - git config --global user.name "${GITHUB_USER}" + - git config remote.origin.url "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/paritytech/${CI_PROJECT_NAME}.git" + - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + # push results to github + - git checkout -b $BRANCHNAME + - git add parachains/* + - git commit -m "[benchmarks] pr with weights" + - git push origin $BRANCHNAME + # create PR + - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} + -d '{"title":"[benchmarks] Update weights for collectives","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}' + -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls + after_script: + - rm -rf .git/config + tags: + - weights + +.publish-benchmarks-s3: stage: publish <<: *kubernetes-env image: paritytech/awscli:latest @@ -325,7 +355,7 @@ publish-benchmarks-s3: # This job cancels the whole pipeline if any of provided jobs fail. # In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests # to fail the pipeline as soon as possible to shorten the feedback loop. -cancel-pipeline: +.cancel-pipeline: stage: .post needs: - job: test-linux-stable diff --git a/Cargo.lock b/Cargo.lock index 52d3abb895c..afb58b15e26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1178,7 +1178,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain 0.9.23", + "polkadot-parachain 0.9.25", "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index ebcc8ebd19e..1c3136cf2a5 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -608,7 +608,8 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] - // TODO:COLLECTIVES Add Alliance + [pallet_alliance, Alliance] + [pallet_collective, AllianceMotion] ); } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 0d322f742df..affda8a2915 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,13 +48,13 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (2_711_000 as Weight) + (5_294_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (2_627_000 as Weight) + (5_180_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs index 89a63ce7601..69a9db7d683 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -44,42 +46,45 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(b: u32, ) -> Weight { + /// The range of component `b` is `[0, 3932160]`. + fn remark(_b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_470_000 as Weight) + (5_069_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((403_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((624_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((304_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((530_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_000 - .saturating_add((677_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 2_000 + .saturating_add((1_059_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs new file mode 100644 index 00000000000..bfa9e3e35b9 --- /dev/null +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs @@ -0,0 +1,279 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `pallet_alliance` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// ./artifacts/polkadot-parachain +// benchmark +// pallet +// --chain=collectives-polkadot-dev +// --execution=wasm +// --wasm-execution=compiled +// --pallet=pallet_alliance +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --json +// --header=./file_header.txt +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_alliance`. +pub struct WeightInfo(PhantomData); +impl pallet_alliance::WeightInfo for WeightInfo { + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion ProposalOf (r:1 w:1) + // Storage: AllianceMotion Proposals (r:1 w:1) + // Storage: AllianceMotion ProposalCount (r:1 w:1) + // Storage: AllianceMotion Voting (r:0 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[0, 90]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(_b: u32, _x: u32, _y: u32, p: u32, ) -> Weight { + (53_023_000 as Weight) + // Standard Error: 2_000 + .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + // Storage: Alliance Members (r:2 w:0) + // Storage: AllianceMotion Voting (r:1 w:1) + /// The range of component `x` is `[3, 10]`. + /// The range of component `y` is `[2, 90]`. + fn vote(x: u32, y: u32, ) -> Weight { + (33_003_000 as Weight) + // Standard Error: 106_000 + .saturating_add((312_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 4_000 + .saturating_add((82_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion ProposalOf (r:1 w:1) + // Storage: AllianceMotion Proposals (r:1 w:1) + // Storage: AllianceMotion Voting (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + fn veto(p: u32, ) -> Weight { + (27_289_000 as Weight) + // Standard Error: 1_000 + .saturating_add((131_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion Voting (r:1 w:1) + // Storage: AllianceMotion Members (r:1 w:0) + // Storage: AllianceMotion Proposals (r:1 w:1) + // Storage: AllianceMotion ProposalOf (r:0 w:1) + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[2, 90]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight { + (31_884_000 as Weight) + // Standard Error: 72_000 + .saturating_add((358_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 3_000 + .saturating_add((109_000 as Weight).saturating_mul(y as Weight)) + // Standard Error: 2_000 + .saturating_add((109_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion Voting (r:1 w:1) + // Storage: AllianceMotion Members (r:1 w:0) + // Storage: AllianceMotion ProposalOf (r:1 w:1) + // Storage: AllianceMotion Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[2, 90]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight { + (43_205_000 as Weight) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 73_000 + .saturating_add((123_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 2_000 + .saturating_add((91_000 as Weight).saturating_mul(y as Weight)) + // Standard Error: 2_000 + .saturating_add((114_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion Voting (r:1 w:1) + // Storage: AllianceMotion Members (r:1 w:0) + // Storage: AllianceMotion Prime (r:1 w:0) + // Storage: AllianceMotion ProposalOf (r:1 w:1) + // Storage: AllianceMotion Proposals (r:1 w:1) + // Storage: Alliance Rule (r:0 w:1) + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[2, 90]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight { + (49_769_000 as Weight) + // Standard Error: 69_000 + .saturating_add((352_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 2_000 + .saturating_add((81_000 as Weight).saturating_mul(y as Weight)) + // Standard Error: 2_000 + .saturating_add((100_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + // Storage: Alliance Members (r:1 w:0) + // Storage: AllianceMotion Voting (r:1 w:1) + // Storage: AllianceMotion Members (r:1 w:0) + // Storage: AllianceMotion Prime (r:1 w:0) + // Storage: AllianceMotion Proposals (r:1 w:1) + // Storage: AllianceMotion ProposalOf (r:0 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[2, 90]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight { + (40_901_000 as Weight) + // Standard Error: 0 + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((79_000 as Weight).saturating_mul(y as Weight)) + // Standard Error: 2_000 + .saturating_add((102_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Alliance Members (r:3 w:3) + // Storage: AllianceMotion Members (r:1 w:1) + /// The range of component `x` is `[2, 10]`. + /// The range of component `y` is `[0, 90]`. + /// The range of component `z` is `[0, 100]`. + fn init_members(_x: u32, y: u32, z: u32, ) -> Weight { + (39_647_000 as Weight) + // Standard Error: 2_000 + .saturating_add((123_000 as Weight).saturating_mul(y as Weight)) + // Standard Error: 2_000 + .saturating_add((116_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + // Storage: Alliance Rule (r:0 w:1) + fn set_rule() -> Weight { + (14_689_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Alliance Announcements (r:1 w:1) + fn announce() -> Weight { + (15_988_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Alliance Announcements (r:1 w:1) + fn remove_announcement() -> Weight { + (16_823_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Alliance UnscrupulousAccounts (r:1 w:0) + // Storage: Alliance Members (r:4 w:1) + // Storage: System Account (r:1 w:1) + // Storage: Alliance DepositOf (r:0 w:1) + fn join_alliance() -> Weight { + (46_340_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + // Storage: Alliance Members (r:4 w:1) + // Storage: Alliance UnscrupulousAccounts (r:1 w:0) + fn nominate_ally() -> Weight { + (36_225_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Alliance Members (r:3 w:2) + // Storage: AllianceMotion Proposals (r:1 w:0) + // Storage: AllianceMotion Members (r:0 w:1) + // Storage: AllianceMotion Prime (r:0 w:1) + fn elevate_ally() -> Weight { + (30_236_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + // Storage: Alliance UpForKicking (r:1 w:0) + // Storage: Alliance Members (r:3 w:1) + // Storage: AllianceMotion Proposals (r:1 w:0) + // Storage: Alliance DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: AllianceMotion Members (r:0 w:1) + // Storage: AllianceMotion Prime (r:0 w:1) + fn retire() -> Weight { + (44_311_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + // Storage: Alliance Members (r:3 w:1) + // Storage: AllianceMotion Proposals (r:1 w:0) + // Storage: Alliance DepositOf (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: AllianceMotion Members (r:0 w:1) + // Storage: AllianceMotion Prime (r:0 w:1) + // Storage: Alliance UpForKicking (r:0 w:1) + fn kick_member() -> Weight { + (46_112_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } + // Storage: Alliance UnscrupulousAccounts (r:1 w:1) + // Storage: Alliance UnscrupulousWebsites (r:1 w:1) + /// The range of component `n` is `[1, 100]`. + /// The range of component `l` is `[1, 255]`. + fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((1_300_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_000 + .saturating_add((125_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: Alliance UnscrupulousAccounts (r:1 w:1) + // Storage: Alliance UnscrupulousWebsites (r:1 w:1) + /// The range of component `n` is `[1, 100]`. + /// The range of component `l` is `[1, 255]`. + fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 197_000 + .saturating_add((34_156_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 87_000 + .saturating_add((7_042_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } +} diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs index e9e82312860..6d97bd946ee 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_balances // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,43 +48,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (35_007_000 as Weight) + (39_576_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (26_281_000 as Weight) + (30_212_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (15_471_000 as Weight) + (19_428_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (19_057_000 as Weight) + (22_526_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (35_036_000 as Weight) + (38_737_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (31_988_000 as Weight) + (35_648_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (14_337_000 as Weight) + (17_197_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index a55a2f8b7ca..9213c294ced 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_collator_selection // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,21 +48,22 @@ pub struct WeightInfo(PhantomData); impl pallet_collator_selection::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { - (8_883_000 as Weight) - // Standard Error: 3_000 - .saturating_add((2_927_000 as Weight).saturating_mul(b as Weight)) + (7_128_000 as Weight) + // Standard Error: 4_000 + .saturating_add((3_105_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (9_058_000 as Weight) + (7_922_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_102_000 as Weight) + (8_226_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -69,19 +72,21 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// The range of component `c` is `[1, 1000]`. fn register_as_candidate(c: u32, ) -> Weight { - (52_247_000 as Weight) + (56_086_000 as Weight) // Standard Error: 1_000 - .saturating_add((94_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((93_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// The range of component `c` is `[6, 1000]`. fn leave_intent(c: u32, ) -> Weight { - (42_428_000 as Weight) + (58_436_000 as Weight) // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -89,7 +94,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (30_722_000 as Weight) + (29_654_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -98,12 +103,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: System Account (r:1 w:1) // Storage: CollatorSelection Invulnerables (r:1 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `r` is `[1, 1000]`. + /// The range of component `c` is `[1, 1000]`. fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_230_000 - .saturating_add((13_222_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 2_230_000 - .saturating_add((58_957_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 1_911_000 + .saturating_add((9_907_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_911_000 + .saturating_add((50_916_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs index 11297f23569..57cee1a56cb 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_multisig // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -44,50 +46,59 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (13_015_000 as Weight) + (17_905_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (27_696_000 as Weight) - // Standard Error: 1_000 - .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) + (34_787_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (31_594_000 as Weight) + (38_845_000 as Weight) // Standard Error: 1_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((75_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (18_129_000 as Weight) - // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) + (25_600_000 as Weight) + // Standard Error: 1_000 + .saturating_add((76_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (30_517_000 as Weight) + (36_944_000 as Weight) // Standard Error: 1_000 - .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -96,49 +107,55 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (38_882_000 as Weight) - // Standard Error: 0 - .saturating_add((170_000 as Weight).saturating_mul(s as Weight)) + (46_014_000 as Weight) + // Standard Error: 1_000 + .saturating_add((126_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (27_825_000 as Weight) - // Standard Error: 0 + (31_616_000 as Weight) + // Standard Error: 1_000 .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (17_556_000 as Weight) + (20_862_000 as Weight) // Standard Error: 0 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((109_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (72_797_000 as Weight) + (64_311_000 as Weight) // Standard Error: 1_000 - .saturating_add((166_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((164_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (50_955_000 as Weight) - // Standard Error: 0 - .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) + (51_181_000 as Weight) + // Standard Error: 2_000 + .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs index 163e7f85dff..cfad3df2b9e 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_proxy // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,96 +47,110 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) + /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (13_697_000 as Weight) - // Standard Error: 1_000 - .saturating_add((92_000 as Weight).saturating_mul(p as Weight)) + (16_628_000 as Weight) + // Standard Error: 2_000 + .saturating_add((90_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (29_761_000 as Weight) - // Standard Error: 1_000 - .saturating_add((225_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((90_000 as Weight).saturating_mul(p as Weight)) + (33_846_000 as Weight) + // Standard Error: 2_000 + .saturating_add((175_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 3_000 + .saturating_add((88_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - (20_197_000 as Weight) - // Standard Error: 1_000 - .saturating_add((235_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((13_000 as Weight).saturating_mul(p as Weight)) + (23_633_000 as Weight) + // Standard Error: 2_000 + .saturating_add((184_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((29_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (20_483_000 as Weight) - // Standard Error: 1_000 - .saturating_add((227_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((10_000 as Weight).saturating_mul(p as Weight)) + (24_121_000 as Weight) + // Standard Error: 2_000 + .saturating_add((177_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((15_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (27_439_000 as Weight) + (31_509_000 as Weight) // Standard Error: 2_000 - .saturating_add((222_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((172_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 2_000 - .saturating_add((98_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((86_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (22_789_000 as Weight) - // Standard Error: 2_000 - .saturating_add((148_000 as Weight).saturating_mul(p as Weight)) + (26_168_000 as Weight) + // Standard Error: 4_000 + .saturating_add((127_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (19_009_000 as Weight) + (26_306_000 as Weight) // Standard Error: 2_000 - .saturating_add((163_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((131_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (18_810_000 as Weight) - // Standard Error: 1_000 - .saturating_add((102_000 as Weight).saturating_mul(p as Weight)) + (22_287_000 as Weight) + // Standard Error: 3_000 + .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (25_779_000 as Weight) - // Standard Error: 1_000 - .saturating_add((33_000 as Weight).saturating_mul(p as Weight)) + (29_260_000 as Weight) + // Standard Error: 2_000 + .saturating_add((38_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (19_961_000 as Weight) + (23_012_000 as Weight) // Standard Error: 2_000 - .saturating_add((90_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((97_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs index 1f08fb458a2..14b53f1e6e3 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_session // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,14 +49,14 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (12_325_000 as Weight) + (15_802_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (9_910_000 as Weight) + (12_925_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs index c2497125b59..08a237a62cf 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_timestamp // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,11 +48,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (3_509_000 as Weight) + (6_170_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_157_000 as Weight) + (2_177_000 as Weight) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs index 7ffae32dcb0..3cf818490b6 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 +//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// ./artifacts/polkadot-parachain // benchmark -// --chain=statemint-dev +// pallet +// --chain=collectives-polkadot-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_utility // --extrinsic=* // --steps=50 // --repeat=20 -// --json-file=./bench-statemint.json +// --json // --header=./file_header.txt -// --output=./polkadot-parachains/statemint/src/weights +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -44,27 +46,28 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (19_538_000 as Weight) + (13_398_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_650_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_159_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_477_000 as Weight) + (4_668_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (22_204_000 as Weight) + (10_742_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_957_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_375_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (8_834_000 as Weight) + (11_022_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (13_470_000 as Weight) - // Standard Error: 1_000 - .saturating_add((4_229_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (14_280_000 as Weight) + // Standard Error: 2_000 + .saturating_add((3_150_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/polkadot-parachain/src/command.rs b/polkadot-parachain/src/command.rs index 704671856f6..8c023602334 100644 --- a/polkadot-parachain/src/command.rs +++ b/polkadot-parachain/src/command.rs @@ -41,6 +41,7 @@ use sc_service::{ use sp_core::hexdisplay::HexDisplay; use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; +#[derive(Debug)] enum Runtime { /// This is the default runtime (based on rococo) Generic, @@ -73,6 +74,7 @@ impl ChainType } fn runtime(id: &str) -> Runtime { + let id = id.replace("_", "-"); if id.starts_with("shell") { Runtime::Shell } else if id.starts_with("seedling") { @@ -488,7 +490,11 @@ pub fn run() -> Result<()> { cmd.run::(config), Runtime::CollectivesPolkadot => cmd.run::(config), - _ => Err("Chain doesn't support benchmarking".into()), + _ => Err(format!( + "Chain '{:?}' doesn't support benchmarking", + config.chain_spec.runtime() + ) + .into()), }) } else { Err("Benchmarking wasn't enabled when building the node. \ diff --git a/scripts/benchmarks-ci.sh b/scripts/benchmarks-ci.sh index b70277b2110..ff87c643a09 100755 --- a/scripts/benchmarks-ci.sh +++ b/scripts/benchmarks-ci.sh @@ -1,30 +1,50 @@ -#!/bin/bash +#!/usr/bin/env bash steps=50 repeat=20 category=$1 runtimeName=$2 +artifactsDir=$3 benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights benchmarkRuntimeName="$runtimeName-dev" -pallets=( - pallet_assets - pallet_balances - pallet_collator_selection - pallet_multisig - pallet_proxy - pallet_session - pallet_timestamp - pallet_utility - pallet_uniques - cumulus_pallet_xcmp_queue - frame_system -) +if [[ $runtimeName == "statemint" ]] || [[ $runtimeName == "statemine" ]] || [[ $runtimeName == "westmint" ]]; then + pallets=( + pallet_assets + pallet_balances + pallet_collator_selection + pallet_multisig + pallet_proxy + pallet_session + pallet_timestamp + pallet_utility + pallet_uniques + cumulus_pallet_xcmp_queue + frame_system + ) +elif [[ $runtimeName == "collectives-polkadot" ]]; then + pallets=( + pallet_alliance + pallet_balances + pallet_collator_selection + pallet_collective + pallet_multisig + pallet_proxy + pallet_session + pallet_timestamp + pallet_utility + cumulus_pallet_xcmp_queue + frame_system + ) +else + echo "$runtimeName pallet list not found in benchmarks-ci.sh" + exit 1 +fi for pallet in ${pallets[@]} do - ./artifacts/polkadot-parachain benchmark pallet \ + $artifactsDir/polkadot-parachain benchmark pallet \ --chain=$benchmarkRuntimeName \ --execution=wasm \ --wasm-execution=compiled \ @@ -34,5 +54,6 @@ do --repeat=$repeat \ --json \ --header=./file_header.txt \ - --output=$benchmarkOutput >> ./artifacts/${pallet}_benchmark.json + --output=$benchmarkOutput >> $artifactsDir/${pallet}_benchmark.json + done diff --git a/scripts/benchmarks.sh b/scripts/benchmarks.sh index a83b8cbcbb6..0dd9544f56d 100755 --- a/scripts/benchmarks.sh +++ b/scripts/benchmarks.sh @@ -1,65 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash -steps=50 -repeat=20 +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -statemineOutput=./parachains/runtimes/assets/statemine/src/weights -statemintOutput=./parachains/runtimes/assets/statemint/src/weights -westmintOutput=./parachains/runtimes/assets/westmint/src/weights +${__dir}/benchmarks-ci.sh collectives collectives-polkadot target/production -statemineChain=statemine-dev -statemintChain=statemint-dev -westmintChain=westmint-dev - -pallets=( - pallet_assets - pallet_balances - pallet_collator_selection - pallet_multisig - pallet_proxy - pallet_session - pallet_timestamp - pallet_utility - pallet_uniques - cumulus_pallet_xcmp_queue - frame_system -) - -for p in ${pallets[@]} -do - ./target/production/polkadot-parachain benchmark pallet \ - --chain=$statemineChain \ - --execution=wasm \ - --wasm-execution=compiled \ - --pallet=$p \ - --extrinsic='*' \ - --steps=$steps \ - --repeat=$repeat \ - --json-file=./bench-statemine.json \ - --header=./file_header.txt \ - --output=$statemineOutput - - ./target/production/polkadot-parachain benchmark pallet \ - --chain=$statemintChain \ - --execution=wasm \ - --wasm-execution=compiled \ - --pallet=$p \ - --extrinsic='*' \ - --steps=$steps \ - --repeat=$repeat \ - --json-file=./bench-statemint.json \ - --header=./file_header.txt \ - --output=$statemintOutput - - ./target/production/polkadot-parachain benchmark pallet \ - --chain=$westmintChain \ - --execution=wasm \ - --wasm-execution=compiled \ - --pallet=$p \ - --extrinsic='*' \ - --steps=$steps \ - --repeat=$repeat \ - --json-file=./bench-westmint.json \ - --header=./file_header.txt \ - --output=$westmintOutput -done +${__dir}/benchmarks-ci.sh assets statemine target/production +${__dir}/benchmarks-ci.sh assets statemint target/production +${__dir}/benchmarks-ci.sh assets westmint target/production