polkadot_runtime_parachains/disputes/benchmarking.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
16
17use super::*;
18
19use frame_benchmarking::v2::*;
20use frame_system::RawOrigin;
21use sp_runtime::traits::One;
22
23#[benchmarks]
24mod benchmarks {
25 use super::*;
26
27 #[benchmark]
28 fn force_unfreeze() {
29 Frozen::<T>::set(Some(One::one()));
30
31 #[extrinsic_call]
32 _(RawOrigin::Root);
33
34 assert!(Frozen::<T>::get().is_none())
35 }
36
37 impl_benchmark_test_suite!(
38 Pallet,
39 crate::mock::new_test_ext(Default::default()),
40 crate::mock::Test
41 );
42}