Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
polkadot: update weights
  • Loading branch information
coderobe committed Oct 26, 2022
commit c16a12f2f9be0b49b7e86cfb70e45d3e61fcc9ca
59 changes: 28 additions & 31 deletions runtime/polkadot/constants/src/weights/block_weights.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
// This file is part of Substrate.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// 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.

// 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.
// 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/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-19 (Y/M/D)
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-25 (Y/M/D)
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//!
//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development`
//! WARMUPS: `10`, REPEAT: `100`
//! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`

// Executed Command:
// ./target/production/polkadot
Expand All @@ -34,32 +32,31 @@
// --weight-path=runtime/polkadot/constants/src/weights/
// --warmup=10
// --repeat=100
// --header=./file_header.txt

use frame_support::{
parameter_types,
weights::{constants::WEIGHT_PER_NANOS, Weight},
};
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_PER_NANOS, Weight};

parameter_types! {
/// Time to execute an empty block.
/// Calculated by multiplying the *Average* with `1` and adding `0`.
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
///
/// Stats nanoseconds:
/// Min, Max: 5_736_651, 6_591_625
/// Average: 5_849_907
/// Median: 5_847_129
/// Std-Dev: 109200.59
/// Min, Max: 5_724_661, 5_957_728
/// Average: 5_773_973
/// Median: 5_766_638
/// Std-Dev: 41694.64
///
/// Percentiles nanoseconds:
/// 99th: 6_131_246
/// 95th: 5_988_921
/// 75th: 5_885_724
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_849_907);
/// 99th: 5_903_185
/// 95th: 5_846_214
/// 75th: 5_789_579
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_773_973);
}

#[cfg(test)]
mod test_weights {
use frame_support::weights::constants;
use sp_weights::constants;

/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
Expand Down
62 changes: 30 additions & 32 deletions runtime/polkadot/constants/src/weights/extrinsic_weights.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
// This file is part of Substrate.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// 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.

// 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.
// 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/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-04-20 (Y/M/D)
//! DATE: 2022-10-25 (Y/M/D)
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//!
//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
//! WARMUPS: `10`, REPEAT: `100`
//! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`

// Executed Command:
// ./target/production/polkadot
Expand All @@ -33,32 +32,31 @@
// --weight-path=runtime/polkadot/constants/src/weights/
// --warmup=10
// --repeat=100
// --header=./file_header.txt

use frame_support::{
parameter_types,
weights::{constants::WEIGHT_PER_NANOS, Weight},
};
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_PER_NANOS, Weight};

parameter_types! {
/// Time to execute a NO-OP extrinsic, for example `System::remark`.
/// Calculated by multiplying the *Average* with `1` and adding `0`.
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
///
/// Stats [NS]:
/// Min, Max: 84_940, 86_590
/// Average: 85_212
/// Median: 85_156
/// Std-Dev: 243.25
/// Stats nanoseconds:
/// Min, Max: 93_411, 94_850
/// Average: 93_780
/// Median: 93_708
/// Std-Dev: 265.55
///
/// Percentiles [NS]:
/// 99th: 86_269
/// 95th: 85_510
/// 75th: 85_216
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(85_212);
/// Percentiles nanoseconds:
/// 99th: 94_619
/// 95th: 94_334
/// 75th: 93_854
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(93_780);
}

#[cfg(test)]
mod test_weights {
use frame_support::weights::constants;
use sp_weights::constants;

/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
Expand Down
42 changes: 25 additions & 17 deletions runtime/polkadot/src/weights/frame_benchmarking_baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `frame_benchmarking::baseline`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-10-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024

Expand All @@ -38,52 +38,60 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight}};
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> {
/// The range of component `i` is `[0, 1000000]`.
fn addition(_i: u32, ) -> Weight {
Weight::from_ref_time(120_000 as u64)
// Minimum execution time: 90 nanoseconds.
Weight::from_ref_time(115_922 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
Weight::from_ref_time(116_000 as u64)
// Minimum execution time: 95 nanoseconds.
Weight::from_ref_time(122_150 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
Weight::from_ref_time(130_000 as u64)
// Minimum execution time: 100 nanoseconds.
Weight::from_ref_time(122_417 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
Weight::from_ref_time(127_000 as u64)
// Minimum execution time: 94 nanoseconds.
Weight::from_ref_time(113_684 as u64)
}
/// The range of component `i` is `[0, 100]`.
fn hashing(_i: u32, ) -> Weight {
Weight::from_ref_time(19_460_902_000 as u64)
// Minimum execution time: 18_993_431 nanoseconds.
Weight::from_ref_time(19_437_135_598 as u64)
}
/// The range of component `i` is `[1, 100]`.
/// The range of component `i` is `[0, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
Weight::from_ref_time(734_000 as u64)
// Standard Error: 21_000
.saturating_add(Weight::from_ref_time(47_456_000 as u64).saturating_mul(i as u64))
// Minimum execution time: 109 nanoseconds.
Weight::from_ref_time(442_381 as u64)
// Standard Error: 16_514
.saturating_add(Weight::from_ref_time(47_391_423 as u64).saturating_mul(i as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[0, 1000]`.
fn storage_read(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 6_000
.saturating_add(Weight::from_ref_time(1_945_000 as u64).saturating_mul(i as u64))
// Minimum execution time: 112 nanoseconds.
Weight::from_ref_time(117_000 as u64)
// Standard Error: 3_518
.saturating_add(Weight::from_ref_time(1_822_376 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[0, 1000]`.
fn storage_write(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(334_000 as u64).saturating_mul(i as u64))
// Minimum execution time: 97 nanoseconds.
Weight::from_ref_time(106_000 as u64)
// Standard Error: 803
.saturating_add(Weight::from_ref_time(317_931 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
}
26 changes: 14 additions & 12 deletions runtime/polkadot/src/weights/frame_election_provider_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `frame_election_provider_support`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-10-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024

Expand All @@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `frame_election_provider_support`.
Expand All @@ -48,20 +48,22 @@ impl<T: frame_system::Config> frame_election_provider_support::WeightInfo for We
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 56_000
.saturating_add(Weight::from_ref_time(13_900_000 as u64).saturating_mul(v as u64))
// Standard Error: 4_843_000
.saturating_add(Weight::from_ref_time(2_216_812_000 as u64).saturating_mul(d as u64))
// Minimum execution time: 5_430_677 nanoseconds.
Weight::from_ref_time(5_464_877_000 as u64)
Comment on lines -51 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

big jump up from 0

// Standard Error: 136_164
.saturating_add(Weight::from_ref_time(5_537_233 as u64).saturating_mul(v as u64))
// Standard Error: 13_920_972
.saturating_add(Weight::from_ref_time(1_533_450_990 as u64).saturating_mul(d as u64))
}
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 84_000
.saturating_add(Weight::from_ref_time(14_955_000 as u64).saturating_mul(v as u64))
// Standard Error: 7_259_000
.saturating_add(Weight::from_ref_time(2_615_111_000 as u64).saturating_mul(d as u64))
// Minimum execution time: 4_281_157 nanoseconds.
Weight::from_ref_time(4_309_020_000 as u64)
Comment on lines -61 to +63
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

// Standard Error: 145_954
.saturating_add(Weight::from_ref_time(5_463_106 as u64).saturating_mul(v as u64))
// Standard Error: 14_921_849
.saturating_add(Weight::from_ref_time(1_772_340_546 as u64).saturating_mul(d as u64))
}
}
Loading