Take into account size as well in weight limiting. (#7369)

* Take into account size as well in weight limiting.

* Fix logging.

* More logs.

* Remove randomized selection in provisioner

No longer supported by runtime.

* Fix and simplify weight calculation.

Random filtering of remote disputes got dropped.

* Make existing tests pass.

* Tests for size limiting.

* Fix provisioner.

* Remove rand dependency.

* Better default block length for tests.

* ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::paras_inherent

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::paras_inherent

* ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::paras_inherent

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com>

* Add back missing line.

* Fix test.

* fmt fix.

* Add missing test annotation

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com>
This commit is contained in:
eskimor
2023-08-01 14:43:54 +02:00
committed by GitHub
parent 4980b64497
commit 367098bae5
13 changed files with 439 additions and 403 deletions
@@ -17,27 +17,26 @@
//! Autogenerated weights for `runtime_parachains::paras_inherent`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-06-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-xerhrdyb-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/polkadot
// target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --pallet=runtime_parachains::paras_inherent
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
// --pallet=runtime_parachains::paras_inherent
// --chain=kusama-dev
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs
// --output=./runtime/kusama/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -115,11 +114,11 @@ impl<T: frame_system::Config> runtime_parachains::paras_inherent::WeightInfo for
// Proof Size summary in bytes:
// Measured: `50671`
// Estimated: `56611 + v * (23 ±0)`
// Minimum execution time: 982_516_000 picoseconds.
Weight::from_parts(453_473_787, 0)
// Minimum execution time: 1_008_586_000 picoseconds.
Weight::from_parts(471_892_709, 0)
.saturating_add(Weight::from_parts(0, 56611))
// Standard Error: 21_034
.saturating_add(Weight::from_parts(57_212_691, 0).saturating_mul(v.into()))
// Standard Error: 15_634
.saturating_add(Weight::from_parts(56_433_120, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(27))
.saturating_add(T::DbWeight::get().writes(15))
.saturating_add(Weight::from_parts(0, 23).saturating_mul(v.into()))
@@ -186,8 +185,8 @@ impl<T: frame_system::Config> runtime_parachains::paras_inherent::WeightInfo for
// Proof Size summary in bytes:
// Measured: `42504`
// Estimated: `48444`
// Minimum execution time: 465_674_000 picoseconds.
Weight::from_parts(483_678_000, 0)
// Minimum execution time: 469_409_000 picoseconds.
Weight::from_parts(487_865_000, 0)
.saturating_add(Weight::from_parts(0, 48444))
.saturating_add(T::DbWeight::get().reads(25))
.saturating_add(T::DbWeight::get().writes(16))
@@ -259,11 +258,11 @@ impl<T: frame_system::Config> runtime_parachains::paras_inherent::WeightInfo for
// Proof Size summary in bytes:
// Measured: `42540`
// Estimated: `48480`
// Minimum execution time: 6_886_272_000 picoseconds.
Weight::from_parts(1_235_371_688, 0)
// Minimum execution time: 6_874_816_000 picoseconds.
Weight::from_parts(1_229_912_739, 0)
.saturating_add(Weight::from_parts(0, 48480))
// Standard Error: 28_012
.saturating_add(Weight::from_parts(56_395_511, 0).saturating_mul(v.into()))
// Standard Error: 27_352
.saturating_add(Weight::from_parts(56_137_302, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(28))
.saturating_add(T::DbWeight::get().writes(15))
}
@@ -337,8 +336,8 @@ impl<T: frame_system::Config> runtime_parachains::paras_inherent::WeightInfo for
// Proof Size summary in bytes:
// Measured: `42567`
// Estimated: `48507`
// Minimum execution time: 42_215_280_000 picoseconds.
Weight::from_parts(43_255_598_000, 0)
// Minimum execution time: 41_075_073_000 picoseconds.
Weight::from_parts(43_753_587_000, 0)
.saturating_add(Weight::from_parts(0, 48507))
.saturating_add(T::DbWeight::get().reads(30))
.saturating_add(T::DbWeight::get().writes(15))