Skip to content

Commit

Permalink
Run all benchmarks (#1749)
Browse files Browse the repository at this point in the history
* Run all benchmarks

* Add missing parameter; Change max batch calls

* Fix test

* Update comment

* Bump spec_version

---------

Co-authored-by: Adam Dossa <[email protected]>
  • Loading branch information
HenriqueNogara and adamdossa authored Nov 6, 2024
1 parent 048d4dc commit 83535d2
Show file tree
Hide file tree
Showing 38 changed files with 1,653 additions and 1,619 deletions.
6 changes: 3 additions & 3 deletions pallets/runtime/common/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ macro_rules! misc_pallet_impls {

impl SubsidyFilter {
fn allowed_batch(calls: &[RuntimeCall]) -> bool {
// Limit batch size to 5.
if calls.len() > 5 {
// Limit batch size to 7.
if calls.len() > 7 {
return false;
}
for call in calls {
Expand All @@ -334,7 +334,7 @@ macro_rules! misc_pallet_impls {
RuntimeCall::Identity(_) => true,
// Allow non-nested batch calls.
RuntimeCall::Utility(call) if nested == false => match call {
// Limit batch size to 5.
// Limit batch size to 7.
pallet_utility::Call::batch { calls } => {
Self::allowed_batch(&calls)
}
Expand Down
2 changes: 1 addition & 1 deletion pallets/runtime/develop/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
authoring_version: 1,
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
// N.B. `d` is unpinned from the binary version
spec_version: 7_000_004,
spec_version: 7_000_005,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 7,
Expand Down
2 changes: 1 addition & 1 deletion pallets/runtime/mainnet/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
authoring_version: 1,
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
// N.B. `d` is unpinned from the binary version
spec_version: 7_000_004,
spec_version: 7_000_005,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 7,
Expand Down
2 changes: 1 addition & 1 deletion pallets/runtime/testnet/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
authoring_version: 1,
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
// N.B. `d` is unpinned from the binary version
spec_version: 7_000_004,
spec_version: 7_000_005,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 7,
Expand Down
4 changes: 3 additions & 1 deletion pallets/runtime/tests/src/relayer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,10 @@ fn do_relayer_batched_subsidy_calls_test() {
call_asset_register_ticker(b"C"),
call_asset_register_ticker(b"D"),
call_asset_register_ticker(b"E"),
// Too many calls.
call_asset_register_ticker(b"F"),
call_asset_register_ticker(b"G"),
// Too many calls.
call_asset_register_ticker(b"H"),
]);
assert_invalid_subsidy_call(&bob.acc(), &call);

Expand Down
42 changes: 21 additions & 21 deletions pallets/weights/src/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for frame_system
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-08-21, STEPS: `100`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-11-03, STEPS: `100`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 512
//! HOSTNAME: `ubuntu-8gb-nbg1-1-bench2`, CPU: `AMD EPYC-Milan Processor`

Expand Down Expand Up @@ -55,56 +55,56 @@ pub struct SubstrateWeight;
impl frame_system::WeightInfo for SubstrateWeight {
/// The range of component `b` is `[0, 7864320]`.
fn remark(b: u32) -> Weight {
// Minimum execution time: 2_554 nanoseconds.
Weight::from_ref_time(15_678_641)
// Minimum execution time: 2_322 nanoseconds.
Weight::from_ref_time(13_323_989)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(276).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 7864320]`.
fn remark_with_event(b: u32) -> Weight {
// Minimum execution time: 8_603 nanoseconds.
Weight::from_ref_time(10_026_122)
// Standard Error: 3
.saturating_add(Weight::from_ref_time(1_187).saturating_mul(b.into()))
// Minimum execution time: 7_811 nanoseconds.
Weight::from_ref_time(8_112_000)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_191).saturating_mul(b.into()))
}
// Storage: System Digest (r:1 w:1)
// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
// Storage: unknown `0x3a686561707061676573` (r:0 w:1)
// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1)
fn set_heap_pages() -> Weight {
// Minimum execution time: 5_008 nanoseconds.
Weight::from_ref_time(5_117_000)
// Minimum execution time: 4_347 nanoseconds.
Weight::from_ref_time(4_997_000)
.saturating_add(DbWeight::get().reads(1))
.saturating_add(DbWeight::get().writes(2))
}
// Storage: Skipped Metadata (r:0 w:0)
// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured)
/// The range of component `i` is `[0, 1000]`.
fn set_storage(i: u32) -> Weight {
// Minimum execution time: 2_564 nanoseconds.
Weight::from_ref_time(2_704_000)
// Standard Error: 1_376
.saturating_add(Weight::from_ref_time(971_747).saturating_mul(i.into()))
// Minimum execution time: 2_755 nanoseconds.
Weight::from_ref_time(2_785_000)
// Standard Error: 1_586
.saturating_add(Weight::from_ref_time(975_700).saturating_mul(i.into()))
.saturating_add(DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
// Storage: Skipped Metadata (r:0 w:0)
// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured)
/// The range of component `i` is `[0, 1000]`.
fn kill_storage(i: u32) -> Weight {
// Minimum execution time: 2_844 nanoseconds.
Weight::from_ref_time(2_854_000)
// Standard Error: 1_300
.saturating_add(Weight::from_ref_time(691_953).saturating_mul(i.into()))
// Minimum execution time: 2_534 nanoseconds.
Weight::from_ref_time(2_554_000)
// Standard Error: 1_494
.saturating_add(Weight::from_ref_time(679_556).saturating_mul(i.into()))
.saturating_add(DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
// Storage: Skipped Metadata (r:0 w:0)
// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured)
/// The range of component `p` is `[0, 1000]`.
fn kill_prefix(p: u32) -> Weight {
// Minimum execution time: 4_957 nanoseconds.
Weight::from_ref_time(5_018_000)
// Standard Error: 1_791
.saturating_add(Weight::from_ref_time(1_217_411).saturating_mul(p.into()))
// Minimum execution time: 4_768 nanoseconds.
Weight::from_ref_time(4_957_000)
// Standard Error: 2_359
.saturating_add(Weight::from_ref_time(1_254_023).saturating_mul(p.into()))
.saturating_add(DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(DbWeight::get().writes((1_u64).saturating_mul(p.into())))
}
Expand Down
Loading

0 comments on commit 83535d2

Please sign in to comment.