This repository was 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.7k
add generated weight info for pallet-collective #6789
Merged
Merged
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b81d0ea
add benchmark for disapprove_proposal
apopiak a6822b0
use generated WeightInfo for pallet-collective weights
apopiak 199a630
order collective benchmark params alphabetically to get a consistent …
apopiak 768a363
address review comments
apopiak ed62a89
remove default impl of WeightInfo for ()
apopiak 335e99a
Merge branch 'master' of github.com:paritytech/substrate into apopiak…
apopiak ec01d1f
remove comments about weight changes
apopiak 1b8c73f
add default weights
apopiak f164146
Merge branch 'master' into apopiak-collective-weight-info
shawntabrizi cc6d91a
Apply suggestions from code review
shawntabrizi fd52a03
whitelist voter account in benchmark
shawntabrizi cbaabb1
Merge branch 'master' into apopiak-collective-weight-info
shawntabrizi 8c7900c
update weights
shawntabrizi bece618
MaxMembers configurable
shawntabrizi 68f74c2
remove base weight comment
shawntabrizi 4d04b4a
add weight to technical collective
shawntabrizi 7800120
another DB whitelist optimization
shawntabrizi 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
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
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,96 @@ | ||
| // Copyright (C) 2020 Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 | ||
|
|
||
| use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; | ||
|
|
||
| pub struct WeightInfo; | ||
| impl pallet_collective::WeightInfo for WeightInfo { | ||
| fn set_members(m: u32, n: u32, p: u32, ) -> Weight { | ||
| (0 as Weight) | ||
| .saturating_add((20267000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((176000 as Weight).saturating_mul(n as Weight)) | ||
| .saturating_add((26230000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add(DbWeight::get().reads(2 as Weight)) | ||
| .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) | ||
| .saturating_add(DbWeight::get().writes(2 as Weight)) | ||
| .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) | ||
| } | ||
| fn execute(b: u32, m: u32, ) -> Weight { | ||
| (26278000 as Weight) | ||
| .saturating_add((111000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((4000 as Weight).saturating_mul(b as Weight)) | ||
| .saturating_add(DbWeight::get().reads(1 as Weight)) | ||
| } | ||
| fn propose_execute(b: u32, m: u32, ) -> Weight { | ||
| (31972000 as Weight) | ||
| .saturating_add((218000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((4000 as Weight).saturating_mul(b as Weight)) | ||
| .saturating_add(DbWeight::get().reads(2 as Weight)) | ||
| } | ||
| fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { | ||
| (53435000 as Weight) | ||
| .saturating_add((158000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((476000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add((2000 as Weight).saturating_mul(b as Weight)) | ||
| .saturating_add(DbWeight::get().reads(4 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(4 as Weight)) | ||
| } | ||
| fn vote(m: u32, ) -> Weight { | ||
| (46165000 as Weight) | ||
| .saturating_add((264000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add(DbWeight::get().reads(2 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(1 as Weight)) | ||
| } | ||
| // WARNING! Some components were not used: ["b"] | ||
| fn close_early_disapproved(m: u32, p: u32, ) -> Weight { | ||
| (52896000 as Weight) | ||
| .saturating_add((242000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((450000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add(DbWeight::get().reads(3 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(3 as Weight)) | ||
| } | ||
| fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { | ||
| (73235000 as Weight) | ||
| .saturating_add((247000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((456000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add((1000 as Weight).saturating_mul(b as Weight)) | ||
| .saturating_add(DbWeight::get().reads(4 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(3 as Weight)) | ||
| } | ||
| // WARNING! Some components were not used: ["b"] | ||
| fn close_disapproved(m: u32, p: u32, ) -> Weight { | ||
| (56171000 as Weight) | ||
| .saturating_add((250000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((462000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add(DbWeight::get().reads(4 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(3 as Weight)) | ||
| } | ||
| fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { | ||
| (77594000 as Weight) | ||
| .saturating_add((246000 as Weight).saturating_mul(m as Weight)) | ||
| .saturating_add((453000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add((2000 as Weight).saturating_mul(b as Weight)) | ||
| .saturating_add(DbWeight::get().reads(5 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(3 as Weight)) | ||
| } | ||
| fn disapprove_proposal(p: u32, ) -> Weight { | ||
| (0 as Weight) | ||
| .saturating_add((490000 as Weight).saturating_mul(p as Weight)) | ||
| .saturating_add(DbWeight::get().reads(1 as Weight)) | ||
| .saturating_add(DbWeight::get().writes(3 as Weight)) | ||
| } | ||
| } | ||
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.