Skip to content

Commit e16ec44

Browse files
authored
fix: off-by-one in block producer fees pallet benchmark (#1102)
1 parent e8558c0 commit e16ec44

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

toolkit/block-producer-fees/pallet/src/benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod benchmarks {
2424
where
2525
<T as crate::Config>::Moment: From<u64>,
2626
{
27-
let size = T::HistoricalChangesPerProducer::get();
27+
let size = T::HistoricalChangesPerProducer::get() + 1;
2828
// Pessimistic storage content for is full, because it requires additional removal from the vecdeque.
2929
let data = (0..size)
3030
.into_iter()

toolkit/block-producer-fees/pallet/src/weights.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
//! Autogenerated weights for pallet_block_producer_fees
33
//!
4-
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 47.0.0
5-
//! DATE: 2025-05-05, STEPS: `5000`, REPEAT: `2000`, LOW RANGE: `[]`, HIGH RANGE: `[]`
4+
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
5+
//! DATE: 2025-11-18, STEPS: `5000`, REPEAT: `2000`, LOW RANGE: `[]`, HIGH RANGE: `[]`
66
//! WORST CASE MAP SIZE: `1000000`
7-
//! HOSTNAME: `framework-13`, CPU: `AMD Ryzen 7 7840U w/ Radeon 780M Graphics`
7+
//! HOSTNAME: `Nikolaoss-MacBook-Pro.local`, CPU: `<UNKNOWN>`
88
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
99
1010
// Executed Command:
@@ -22,9 +22,9 @@
2222
// --repeat=2000
2323
// --wasm-execution=compiled
2424
// --output
25-
// toolkit/block-producer-fees/pallet/src/weights.rs
25+
// ./toolkit/block-producer-fees/pallet/src/weights.rs
2626
// --template
27-
// .maintain/frame-weight-template.hbs
27+
// ./.maintain/frame-weight-template.hbs
2828

2929
#![cfg_attr(rustfmt, rustfmt_skip)]
3030
#![allow(unused_parens)]
@@ -48,10 +48,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
4848
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
4949
fn set_fee() -> Weight {
5050
// Proof Size summary in bytes:
51-
// Measured: `1046`
52-
// Estimated: `4511`
53-
// Minimum execution time: 11_562_000 picoseconds.
54-
Weight::from_parts(12_423_000, 4511)
51+
// Measured: `1056`
52+
// Estimated: `4521`
53+
// Minimum execution time: 10_000_000 picoseconds.
54+
Weight::from_parts(11_000_000, 4521)
5555
.saturating_add(T::DbWeight::get().reads(2_u64))
5656
.saturating_add(T::DbWeight::get().writes(1_u64))
5757
}
@@ -65,10 +65,10 @@ impl WeightInfo for () {
6565
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
6666
fn set_fee() -> Weight {
6767
// Proof Size summary in bytes:
68-
// Measured: `1046`
69-
// Estimated: `4511`
70-
// Minimum execution time: 11_562_000 picoseconds.
71-
Weight::from_parts(12_423_000, 4511)
68+
// Measured: `1056`
69+
// Estimated: `4521`
70+
// Minimum execution time: 10_000_000 picoseconds.
71+
Weight::from_parts(11_000_000, 4521)
7272
.saturating_add(RocksDbWeight::get().reads(2_u64))
7373
.saturating_add(RocksDbWeight::get().writes(1_u64))
7474
}

0 commit comments

Comments
 (0)