MillauWeight -> BridgeWeight (#1593)

This commit is contained in:
Svyatoslav Nikolsky
2022-10-04 14:18:22 +03:00
committed by Bastian Köcher
parent 4f4200b0eb
commit 6f9bda5db0
12 changed files with 80 additions and 72 deletions
+32 -30
View File
@@ -17,7 +17,7 @@
//! Autogenerated weights for `pallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-07-20, STEPS: 50, REPEAT: 20
//! DATE: 2022-10-04, STEPS: 50, REPEAT: 20
//! LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled
//! CHAIN: Some("dev"), DB CACHE: 1024
@@ -66,26 +66,28 @@ pub trait WeightInfo {
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight;
}
/// Weights for `pallet_bridge_messages` using the Millau node and recommended hardware.
pub struct MillauWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for MillauWeight<T> {
/// Weights for `pallet_bridge_messages` that are generated using one of the Bridge testnets.
///
/// Those weights are test only and must never be used in production.
pub struct BridgeWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
fn send_minimal_message_worst_case() -> Weight {
(38_822_000 as Weight)
(62_300_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(10 as Weight))
}
fn send_1_kb_message_worst_case() -> Weight {
(39_799_000 as Weight)
(63_176_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(10 as Weight))
}
fn send_16_kb_message_worst_case() -> Weight {
(47_772_000 as Weight)
(73_472_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(10 as Weight))
}
fn maximal_increase_message_fee() -> Weight {
(3_081_804_000 as Weight)
(2_539_209_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -96,47 +98,47 @@ impl<T: frame_system::Config> WeightInfo for MillauWeight<T> {
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn receive_single_message_proof() -> Weight {
(26_523_000 as Weight)
(49_205_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_two_messages_proof() -> Weight {
(39_278_000 as Weight)
(62_182_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
(32_416_000 as Weight)
(55_928_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_single_message_proof_1_kb() -> Weight {
(27_078_000 as Weight)
(47_298_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn receive_single_message_proof_16_kb() -> Weight {
(78_235_000 as Weight)
(105_016_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn receive_single_prepaid_message_proof() -> Weight {
(27_635_000 as Weight)
(49_067_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_single_message() -> Weight {
(34_576_000 as Weight)
(58_520_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
(37_318_000 as Weight)
(61_563_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
(41_245_000 as Weight)
(63_197_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
@@ -145,22 +147,22 @@ impl<T: frame_system::Config> WeightInfo for MillauWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
fn send_minimal_message_worst_case() -> Weight {
(38_822_000 as Weight)
(62_300_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(10 as Weight))
}
fn send_1_kb_message_worst_case() -> Weight {
(39_799_000 as Weight)
(63_176_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(10 as Weight))
}
fn send_16_kb_message_worst_case() -> Weight {
(47_772_000 as Weight)
(73_472_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(10 as Weight))
}
fn maximal_increase_message_fee() -> Weight {
(3_081_804_000 as Weight)
(2_539_209_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -171,47 +173,47 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn receive_single_message_proof() -> Weight {
(26_523_000 as Weight)
(49_205_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_two_messages_proof() -> Weight {
(39_278_000 as Weight)
(62_182_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
(32_416_000 as Weight)
(55_928_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_single_message_proof_1_kb() -> Weight {
(27_078_000 as Weight)
(47_298_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn receive_single_message_proof_16_kb() -> Weight {
(78_235_000 as Weight)
(105_016_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn receive_single_prepaid_message_proof() -> Weight {
(27_635_000 as Weight)
(49_067_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_single_message() -> Weight {
(34_576_000 as Weight)
(58_520_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
(37_318_000 as Weight)
(61_563_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
(41_245_000 as Weight)
(63_197_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}