mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-27 19:51:09 +00:00
7b56ab15b4
* Run cargo fmt on the whole code base * Second run * Add CI check * Fix compilation * More unnecessary braces * Handle weights * Use --all * Use correct attributes... * Fix UI tests * AHHHHHHHHH * 🤦 * Docs * Fix compilation * 🤷 * Please stop * 🤦 x 2 * More * make rustfmt.toml consistent with polkadot Co-authored-by: André Silva <andrerfosilva@gmail.com>
21 lines
508 B
Rust
21 lines
508 B
Rust
//! Benchmarking setup for pallet-template
|
|
|
|
use super::*;
|
|
|
|
#[allow(unused)]
|
|
use crate::Pallet as Template;
|
|
use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller};
|
|
use frame_system::RawOrigin;
|
|
|
|
benchmarks! {
|
|
do_something {
|
|
let s in 0 .. 100;
|
|
let caller: T::AccountId = whitelisted_caller();
|
|
}: _(RawOrigin::Signed(caller), s)
|
|
verify {
|
|
assert_eq!(Something::<T>::get(), Some(s));
|
|
}
|
|
}
|
|
|
|
impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test);
|