-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from mangata-finance/feature/fix-xyk-benchmarks
xyk & pallet bootstrap benchmarks
- Loading branch information
Showing
23 changed files
with
2,195 additions
and
495 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
#![allow(clippy::unnecessary_cast)] | ||
|
||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; | ||
use sp_std::marker::PhantomData; | ||
|
||
/// Weight functions needed for pallet_bootstrap. | ||
pub trait WeightInfo { | ||
fn start_ido() -> Weight; | ||
fn provision() -> Weight; | ||
fn provision_vested() -> Weight; | ||
fn claim_rewards() -> Weight; | ||
} | ||
|
||
|
||
// For backwards compatibility and tests | ||
impl WeightInfo for () { | ||
fn start_ido() -> Weight { | ||
(23_396_000 as Weight) | ||
.saturating_add(RocksDbWeight::get().reads(3 as Weight)) | ||
.saturating_add(RocksDbWeight::get().writes(1 as Weight)) | ||
} | ||
fn provision() -> Weight { | ||
(103_365_000 as Weight) | ||
.saturating_add(RocksDbWeight::get().reads(7 as Weight)) | ||
.saturating_add(RocksDbWeight::get().writes(5 as Weight)) | ||
} | ||
fn provision_vested() -> Weight { | ||
(150_718_000 as Weight) | ||
.saturating_add(RocksDbWeight::get().reads(9 as Weight)) | ||
.saturating_add(RocksDbWeight::get().writes(7 as Weight)) | ||
} | ||
fn claim_rewards() -> Weight { | ||
(273_011_000 as Weight) | ||
.saturating_add(RocksDbWeight::get().reads(13 as Weight)) | ||
.saturating_add(RocksDbWeight::get().writes(6 as Weight)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.