Skip to content

Commit

Permalink
Update benchmark weights (#1515)
Browse files Browse the repository at this point in the history
* Update benchmark weights

* Cargo fmt; Update expected weights

* include removed params

* linting

---------

Co-authored-by: Adam Dossa <[email protected]>
Co-authored-by: Robert Gabriel Jakabosky <[email protected]>
  • Loading branch information
3 people authored Sep 5, 2023
1 parent 5a3d9c6 commit 4ec059b
Show file tree
Hide file tree
Showing 33 changed files with 2,900 additions and 1,261 deletions.
4 changes: 2 additions & 2 deletions pallets/runtime/tests/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type BridgeTxDetail = GBridgeTxDetail<u32>;
const AMOUNT: u128 = 1_000_000_000;
const AMOUNT_OVER_LIMIT: u128 = 1_000_000_000_000_000_000_000;
// Note: Need to update these weights after running benchmarks.
const WEIGHT_EXPECTED_1: Weight = Weight::from_ref_time(1_033_932_994);
const WEIGHT_EXPECTED_2: Weight = Weight::from_ref_time(2_578_448_374);
const WEIGHT_EXPECTED_1: Weight = Weight::from_ref_time(1_039_886_700);
const WEIGHT_EXPECTED_2: Weight = Weight::from_ref_time(2_611_693_677);
const MIN_SIGNS_REQUIRED: u64 = 2;

fn test_with_controller(test: &dyn Fn(&[AccountId])) {
Expand Down
58 changes: 33 additions & 25 deletions pallets/weights/src/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
//! Autogenerated weights for frame_system
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-25, STEPS: `100`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-24, STEPS: `100`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 512
//! HOSTNAME: `dev-fsn001`, CPU: `AMD Ryzen 9 5950X 16-Core Processor`
//! HOSTNAME: `ubuntu-8gb-hel1-5`, CPU: `AMD EPYC Processor`

// Executed Command:
// ./target/release/polymesh
// target/release/polymesh
// benchmark
// pallet
// -s
// 100
// -r
// 5
// -p=frame_system
// -p=*
// -e=*
// --heap-pages
// 4096
Expand All @@ -55,49 +55,57 @@ pub struct SubstrateWeight;
impl frame_system::WeightInfo for SubstrateWeight {
/// The range of component `b` is `[0, 7864320]`.
fn remark(b: u32) -> Weight {
Weight::from_ref_time(382_693_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(219 as u64).saturating_mul(b as u64))
// Minimum execution time: 7_785 nanoseconds.
Weight::from_ref_time(25_375_978)
// Standard Error: 3
.saturating_add(Weight::from_ref_time(614).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 7864320]`.
fn remark_with_event(b: u32) -> Weight {
Weight::from_ref_time(133_584_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64))
// Minimum execution time: 14_215 nanoseconds.
Weight::from_ref_time(15_589_000)
// Standard Error: 5
.saturating_add(Weight::from_ref_time(2_110).saturating_mul(b.into()))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 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: 9_457 nanoseconds.
Weight::from_ref_time(10_038_000)
// Minimum execution time: 8_286 nanoseconds.
Weight::from_ref_time(8_896_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: 4_689 nanoseconds.
Weight::from_ref_time(4_839_000)
// Standard Error: 2_971
.saturating_add(Weight::from_ref_time(690_562).saturating_mul(i.into()))
// Minimum execution time: 7_444 nanoseconds.
Weight::from_ref_time(8_165_000)
// Standard Error: 12_755
.saturating_add(Weight::from_ref_time(1_635_273).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: 4_859 nanoseconds.
Weight::from_ref_time(5_029_000)
// Standard Error: 1_057
.saturating_add(Weight::from_ref_time(553_304).saturating_mul(i.into()))
// Minimum execution time: 5_460 nanoseconds.
Weight::from_ref_time(5_631_000)
// Standard Error: 11_680
.saturating_add(Weight::from_ref_time(1_257_520).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: 7_203 nanoseconds.
Weight::from_ref_time(7_253_000)
// Standard Error: 3_674
.saturating_add(Weight::from_ref_time(1_089_831).saturating_mul(p.into()))
// Minimum execution time: 8_807 nanoseconds.
Weight::from_ref_time(26_713_025)
// Standard Error: 61_288
.saturating_add(Weight::from_ref_time(2_252_911).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())))
}
}
Loading

0 comments on commit 4ec059b

Please sign in to comment.