// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
//
// Zeitgeist is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
//
// Zeitgeist is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for pallet_membership
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: `2024-08-27`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`

// Executed Command:
// ./target/production/zeitgeist
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_membership
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./misc/frame_weight_template.hbs
// --header=./HEADER_GPL3
// --output=./runtime/common/src/weights/

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

use core::marker::PhantomData;
use frame_support::{
    traits::Get,
    weights::{constants::RocksDbWeight, Weight},
};

/// Weight functions for pallet_membership (automatically generated)
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_membership::weights::WeightInfo for WeightInfo<T> {
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Proposals` (r:1 w:0)
    /// Proof: `AdvisoryCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Members` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[1, 99]`.
    fn add_member(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `135 + m * (64 ±0)`
        //  Estimated: `4687 + m * (64 ±0)`
        // Minimum execution time: 19_490 nanoseconds.
        Weight::from_parts(20_579_688, 4687)
            // Standard Error: 921
            .saturating_add(Weight::from_parts(40_438, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(3))
            .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Proposals` (r:1 w:0)
    /// Proof: `AdvisoryCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:1 w:0)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Members` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[2, 100]`.
    fn remove_member(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `239 + m * (64 ±0)`
        //  Estimated: `4687 + m * (64 ±0)`
        // Minimum execution time: 22_690 nanoseconds.
        Weight::from_parts(23_795_130, 4687)
            // Standard Error: 964
            .saturating_add(Weight::from_parts(30_543, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(3))
            .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Proposals` (r:1 w:0)
    /// Proof: `AdvisoryCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:1 w:0)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Members` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[2, 100]`.
    fn swap_member(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `239 + m * (64 ±0)`
        //  Estimated: `4687 + m * (64 ±0)`
        // Minimum execution time: 22_541 nanoseconds.
        Weight::from_parts(23_622_603, 4687)
            // Standard Error: 1_292
            .saturating_add(Weight::from_parts(50_057, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(3))
            .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Proposals` (r:1 w:0)
    /// Proof: `AdvisoryCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:1 w:0)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Members` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[1, 100]`.
    fn reset_member(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `239 + m * (64 ±0)`
        //  Estimated: `4687 + m * (64 ±0)`
        // Minimum execution time: 21_700 nanoseconds.
        Weight::from_parts(23_685_037, 4687)
            // Standard Error: 1_430
            .saturating_add(Weight::from_parts(177_796, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(3))
            .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Proposals` (r:1 w:0)
    /// Proof: `AdvisoryCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:1 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Members` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[1, 100]`.
    fn change_key(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `239 + m * (64 ±0)`
        //  Estimated: `4687 + m * (64 ±0)`
        // Minimum execution time: 23_461 nanoseconds.
        Weight::from_parts(24_947_150, 4687)
            // Standard Error: 1_644
            .saturating_add(Weight::from_parts(49_382, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(4))
            .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Members` (r:1 w:0)
    /// Proof: `AdvisoryCommitteeMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[1, 100]`.
    fn set_prime(m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `104 + m * (32 ±0)`
        //  Estimated: `4687 + m * (32 ±0)`
        // Minimum execution time: 10_210 nanoseconds.
        Weight::from_parts(10_982_994, 4687)
            // Standard Error: 621
            .saturating_add(Weight::from_parts(15_701, 0).saturating_mul(m.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(2))
            .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
    }
    /// Storage: `AdvisoryCommitteeMembership::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommitteeMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
    /// Storage: `AdvisoryCommittee::Prime` (r:0 w:1)
    /// Proof: `AdvisoryCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
    /// The range of component `m` is `[1, 100]`.
    fn clear_prime(_m: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `0`
        //  Estimated: `0`
        // Minimum execution time: 3_530 nanoseconds.
        Weight::from_parts(4_001_974, 0).saturating_add(T::DbWeight::get().writes(2))
    }
}
