Benchmark pallet sudo (#13880)

* set_key

* v2

* update runtime

* cargo fmt

* remove commenting

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_sudo

* impl weights

* sudo & sudo_as

* where

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_sudo

* update weights

* cargo fmt

* Update Cargo.lock

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Doordashcon
2023-05-11 14:28:46 +01:00
committed by GitHub
parent f36749b99e
commit 4795c29e9c
10 changed files with 240 additions and 5 deletions
+6
View File
@@ -148,6 +148,7 @@ impl logger::Config for Test {
impl Config for Test {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WeightInfo = ();
}
// New types for dispatchable functions.
@@ -162,3 +163,8 @@ pub fn new_test_ext(root_key: u64) -> sp_io::TestExternalities {
.unwrap();
t.into()
}
#[cfg(feature = "runtime-benchmarks")]
pub fn new_bench_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into()
}