Skip to content

Commit

Permalink
Update module reward benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
justinphamnz committed Mar 25, 2023
1 parent 58d28ea commit 8c9b144
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/pioneer/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pub mod module_estate;
pub mod module_metaverse;
pub mod module_mining;
pub mod module_nft;
//pub mod module_reward;
pub mod module_reward;
96 changes: 96 additions & 0 deletions runtime/pioneer/src/weights/module_reward.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// This default_weight is manually generated for UI integration testing purpose
// This bench_marking cli need to run to complete bench marking for all functions

#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for module_nft.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> reward::WeightInfo for WeightInfo<T> {
fn create_campaign() -> Weight {
(41_707_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
fn create_nft_campaign() -> Weight {
(43_668_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
fn claim_reward() -> Weight {
(35_006_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn claim_reward_root() -> Weight {
(42_272_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn claim_nft_reward() -> Weight {
(39_669_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn claim_nft_reward_root() -> Weight {
(44_661_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_reward() -> Weight {
(21_354_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_reward_root() -> Weight {
(22_813_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn set_nft_reward() -> Weight {
(22_278_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_nft_reward_root() -> Weight {
(22_938_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn close_campaign() -> Weight {
(50_279_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
fn close_nft_campaign() -> Weight {
(47_338_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
fn cancel_campaign() -> Weight {
(38_746_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_nft_campaign() -> Weight {
(31_672_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn add_set_reward_origin() -> Weight {
(11_374_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_set_reward_origin() -> Weight {
(11_973_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn on_finalize() -> Weight {
(13_598_000 as Weight).saturating_add(T::DbWeight::get().reads(2 as Weight))
}
}

0 comments on commit 8c9b144

Please sign in to comment.