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 1.6k
Add baseline benchmarks #4777
Merged
+210
−24
Merged
Add baseline benchmarks #4777
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d0fcc4f
Don't merge this
ggwpez d1ced9b
cargo run --quiet --profile=production --features=runtime-benchmarks…
b90ac77
cargo run --quiet --profile=production --features=runtime-benchmarks…
0b9c96d
Add baseline benches
ggwpez 5f3565b
Revert "Don't merge this"
ggwpez 37395fa
Merge branch 'master' of https://github.com/paritytech/polkadot into …
0865b52
cargo run --quiet --profile=production --features=runtime-benchmarks…
fe7801a
cargo run --quiet --profile=production --features=runtime-benchmarks…
04d0eb6
Add weight modules
ggwpez deeede3
Apply suggestions from code review
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright 2017-2021 Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot 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. | ||
|
||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
//! Autogenerated weights for `frame_benchmarking::baseline` | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev | ||
//! DATE: 2022-01-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 | ||
|
||
// Executed Command: | ||
// target/production/polkadot | ||
// benchmark | ||
// --chain=kusama-dev | ||
// --steps=50 | ||
// --repeat=20 | ||
// --pallet=frame_benchmarking::baseline | ||
// --extrinsic=* | ||
// --execution=wasm | ||
// --wasm-execution=compiled | ||
// --heap-pages=4096 | ||
// --header=./file_header.txt | ||
// --output=./runtime/kusama/src/weights/frame_benchmarking_baseline.rs | ||
|
||
#![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 `frame_benchmarking::baseline`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> { | ||
fn addition(_i: u32, ) -> Weight { | ||
(128_000 as Weight) | ||
} | ||
fn subtraction(_i: u32, ) -> Weight { | ||
(128_000 as Weight) | ||
} | ||
fn multiplication(_i: u32, ) -> Weight { | ||
(133_000 as Weight) | ||
} | ||
fn division(_i: u32, ) -> Weight { | ||
(147_000 as Weight) | ||
} | ||
fn hashing(i: u32, ) -> Weight { | ||
(19_711_716_000 as Weight) | ||
// Standard Error: 116_000 | ||
.saturating_add((320_000 as Weight).saturating_mul(i as Weight)) | ||
} | ||
fn sr25519_verification(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 14_000 | ||
.saturating_add((47_625_000 as Weight).saturating_mul(i as Weight)) | ||
} | ||
// Storage: Skipped Metadata (r:0 w:0) | ||
fn storage_read(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 3_000 | ||
.saturating_add((2_027_000 as Weight).saturating_mul(i as Weight)) | ||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) | ||
} | ||
// Storage: Skipped Metadata (r:0 w:0) | ||
fn storage_write(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 0 | ||
.saturating_add((329_000 as Weight).saturating_mul(i as Weight)) | ||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) | ||
} | ||
} |
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
82 changes: 82 additions & 0 deletions
82
runtime/polkadot/src/weights/frame_benchmarking_baseline.rs
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright 2017-2021 Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot 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. | ||
|
||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
//! Autogenerated weights for `frame_benchmarking::baseline` | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev | ||
//! DATE: 2022-01-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 | ||
|
||
// Executed Command: | ||
// target/production/polkadot | ||
// benchmark | ||
// --chain=polkadot-dev | ||
// --steps=50 | ||
// --repeat=20 | ||
// --pallet=frame_benchmarking::baseline | ||
// --extrinsic=* | ||
// --execution=wasm | ||
// --wasm-execution=compiled | ||
// --heap-pages=4096 | ||
// --header=./file_header.txt | ||
// --output=./runtime/polkadot/src/weights/frame_benchmarking_baseline.rs | ||
|
||
#![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 `frame_benchmarking::baseline`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> { | ||
fn addition(_i: u32, ) -> Weight { | ||
(112_000 as Weight) | ||
} | ||
fn subtraction(_i: u32, ) -> Weight { | ||
(112_000 as Weight) | ||
} | ||
fn multiplication(_i: u32, ) -> Weight { | ||
(112_000 as Weight) | ||
} | ||
fn division(_i: u32, ) -> Weight { | ||
(111_000 as Weight) | ||
} | ||
fn hashing(i: u32, ) -> Weight { | ||
(19_613_380_000 as Weight) | ||
// Standard Error: 88_000 | ||
.saturating_add((203_000 as Weight).saturating_mul(i as Weight)) | ||
} | ||
fn sr25519_verification(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 15_000 | ||
.saturating_add((47_554_000 as Weight).saturating_mul(i as Weight)) | ||
} | ||
// Storage: Skipped Metadata (r:0 w:0) | ||
fn storage_read(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 3_000 | ||
.saturating_add((1_973_000 as Weight).saturating_mul(i as Weight)) | ||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) | ||
} | ||
// Storage: Skipped Metadata (r:0 w:0) | ||
fn storage_write(i: u32, ) -> Weight { | ||
(0 as Weight) | ||
// Standard Error: 0 | ||
.saturating_add((323_000 as Weight).saturating_mul(i as Weight)) | ||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) | ||
} | ||
} |
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
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.
@ reviewers:
The ignored parameters here are a known issue; https://github.com/paritytech/substrate/issues/10638