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

update weights, attempt two (0.9.31) #6189

Merged
merged 7 commits into from
Oct 28, 2022
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
rococo: update weights
  • Loading branch information
coderobe committed Oct 26, 2022
commit 47823680122436f48e2e265cfc8f4d22a2155be4
59 changes: 28 additions & 31 deletions runtime/rococo/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: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-25 (Y/M/D)
//! HOSTNAME: `bm5`, 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/rococo/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/rococo/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: 4_039_227, 4_394_160
/// Average: 4_084_738
/// Median: 4_077_180
/// Std-Dev: 44325.29
/// Min, Max: 5_028_795, 5_299_376
/// Average: 5_112_220
/// Median: 5_112_316
/// Std-Dev: 66397.03
///
/// Percentiles nanoseconds:
/// 99th: 4_189_094
/// 95th: 4_152_261
/// 75th: 4_098_529
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_084_738);
/// 99th: 5_294_206
/// 95th: 5_220_039
/// 75th: 5_149_614
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_112_220);
}

#[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
58 changes: 28 additions & 30 deletions runtime/rococo/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-05-25 (Y/M/D)
//! DATE: 2022-10-25 (Y/M/D)
//! HOSTNAME: `bm5`, 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/rococo/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/rococo/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 nanoseconds:
/// Min, Max: 77_945, 79_607
/// Average: 78_269
/// Median: 78_211
/// Std-Dev: 259.27
/// Min, Max: 88_402, 90_261
/// Average: 88_851
/// Median: 88_823
/// Std-Dev: 315.42
///
/// Percentiles nanoseconds:
/// 99th: 79_591
/// 95th: 78_730
/// 75th: 78_272
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(78_269);
/// 99th: 90_200
/// 95th: 89_354
/// 75th: 88_922
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(88_851);
}

#[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
50 changes: 28 additions & 22 deletions runtime/rococo/src/weights/frame_benchmarking_baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//! Autogenerated weights for `frame_benchmarking::baseline`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -46,46 +46,52 @@ 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 {
(126_000 as Weight)
// Minimum execution time: 100 nanoseconds.
Weight::from_ref_time(147_688 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
(117_000 as Weight)
// Minimum execution time: 100 nanoseconds.
Weight::from_ref_time(147_383 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
(132_000 as Weight)
// Minimum execution time: 90 nanoseconds.
Weight::from_ref_time(147_362 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
(132_000 as Weight)
// Minimum execution time: 94 nanoseconds.
Weight::from_ref_time(142_468 as u64)
}
/// The range of component `i` is `[0, 100]`.
fn hashing(i: u32, ) -> Weight {
(19_331_786_000 as Weight)
// Standard Error: 113_000
.saturating_add((410_000 as Weight).saturating_mul(i as Weight))
fn hashing(_i: u32, ) -> Weight {
// Minimum execution time: 19_076_234 nanoseconds.
Weight::from_ref_time(19_306_096_061 as u64)
}
/// The range of component `i` is `[1, 100]`.
/// The range of component `i` is `[0, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 15_000
.saturating_add((47_597_000 as Weight).saturating_mul(i as Weight))
// Minimum execution time: 152 nanoseconds.
Weight::from_ref_time(170_000 as u64)
// Standard Error: 22_217
.saturating_add(Weight::from_ref_time(47_861_042 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 {
(0 as Weight)
// Standard Error: 3_000
.saturating_add((2_126_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
// Minimum execution time: 130 nanoseconds.
Weight::from_ref_time(143_000 as u64)
// Standard Error: 3_691
.saturating_add(Weight::from_ref_time(1_837_360 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 {
(0 as Weight)
// Standard Error: 0
.saturating_add((328_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
// Minimum execution time: 104 nanoseconds.
Weight::from_ref_time(124_000 as u64)
// Standard Error: 857
.saturating_add(Weight::from_ref_time(315_739 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
}
46 changes: 27 additions & 19 deletions runtime/rococo/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `frame_system`
//!
//! 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: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024

Expand All @@ -38,51 +38,59 @@
#![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_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
fn remark(b: u32, ) -> Weight {
// Minimum execution time: 3_577 nanoseconds.
Weight::from_ref_time(3_668_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(413 as u64).saturating_mul(b as u64))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Minimum execution time: 12_303 nanoseconds.
Weight::from_ref_time(12_411_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64))
.saturating_add(Weight::from_ref_time(1_728 as u64).saturating_mul(b as u64))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
Weight::from_ref_time(8_025_000 as u64)
// Minimum execution time: 7_559 nanoseconds.
Weight::from_ref_time(7_837_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
/// The range of component `i` is `[0, 1000]`.
fn set_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(602_000 as u64).saturating_mul(i as u64))
// Minimum execution time: 3_705 nanoseconds.
Weight::from_ref_time(3_820_000 as u64)
// Standard Error: 2_019
.saturating_add(Weight::from_ref_time(604_466 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
/// The range of component `i` is `[0, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(456_000 as u64).saturating_mul(i as u64))
// Minimum execution time: 3_749 nanoseconds.
Weight::from_ref_time(3_791_000 as u64)
// Standard Error: 994
.saturating_add(Weight::from_ref_time(433_769 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `p` is `[1, 1000]`.
/// The range of component `p` is `[0, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(1_010_000 as u64).saturating_mul(p as u64))
// Minimum execution time: 5_101 nanoseconds.
Weight::from_ref_time(5_266_000 as u64)
// Standard Error: 1_406
.saturating_add(Weight::from_ref_time(941_250 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
}
Loading