// 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_proxy
//!
//! 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_proxy
// --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_proxy (automatically generated)
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::weights::WeightInfo for WeightInfo<T> {
    /// Storage: `Proxy::Proxies` (r:1 w:0)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[1, 31]`.
    fn proxy(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `90 + p * (41 ±0)`
        //  Estimated: `4834`
        // Minimum execution time: 16_920 nanoseconds.
        Weight::from_parts(17_939_365, 4834)
            // Standard Error: 2_806
            .saturating_add(Weight::from_parts(69_238, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:0)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// Storage: `Proxy::Announcements` (r:1 w:1)
    /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2361), added: 4836, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:1 w:1)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// The range of component `a` is `[0, 31]`.
    /// The range of component `p` is `[1, 31]`.
    fn proxy_announced(a: u32, p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `425 + a * (72 ±0) + p * (41 ±0)`
        //  Estimated: `5826`
        // Minimum execution time: 43_551 nanoseconds.
        Weight::from_parts(44_483_496, 5826)
            // Standard Error: 4_497
            .saturating_add(Weight::from_parts(208_946, 0).saturating_mul(a.into()))
            // Standard Error: 4_646
            .saturating_add(Weight::from_parts(52_016, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Proxy::Announcements` (r:1 w:1)
    /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2361), added: 4836, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:1 w:1)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// The range of component `a` is `[0, 31]`.
    /// The range of component `p` is `[1, 31]`.
    fn remove_announcement(a: u32, p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `340 + a * (72 ±0)`
        //  Estimated: `5826`
        // Minimum execution time: 27_321 nanoseconds.
        Weight::from_parts(27_973_290, 5826)
            // Standard Error: 2_763
            .saturating_add(Weight::from_parts(232_410, 0).saturating_mul(a.into()))
            // Standard Error: 2_855
            .saturating_add(Weight::from_parts(22_288, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Proxy::Announcements` (r:1 w:1)
    /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2361), added: 4836, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:1 w:1)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// The range of component `a` is `[0, 31]`.
    /// The range of component `p` is `[1, 31]`.
    fn reject_announcement(a: u32, p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `340 + a * (72 ±0)`
        //  Estimated: `5826`
        // Minimum execution time: 27_801 nanoseconds.
        Weight::from_parts(28_758_659, 5826)
            // Standard Error: 2_794
            .saturating_add(Weight::from_parts(205_254, 0).saturating_mul(a.into()))
            // Standard Error: 2_887
            .saturating_add(Weight::from_parts(15_426, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:0)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// Storage: `Proxy::Announcements` (r:1 w:1)
    /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2361), added: 4836, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:1 w:1)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// The range of component `a` is `[0, 31]`.
    /// The range of component `p` is `[1, 31]`.
    fn announce(a: u32, p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `353 + a * (72 ±0) + p * (41 ±0)`
        //  Estimated: `5826`
        // Minimum execution time: 39_641 nanoseconds.
        Weight::from_parts(39_272_578, 5826)
            // Standard Error: 3_972
            .saturating_add(Weight::from_parts(219_111, 0).saturating_mul(a.into()))
            // Standard Error: 4_103
            .saturating_add(Weight::from_parts(65_161, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:1)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[1, 31]`.
    fn add_proxy(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `90 + p * (41 ±0)`
        //  Estimated: `4834`
        // Minimum execution time: 28_670 nanoseconds.
        Weight::from_parts(29_765_887, 4834)
            // Standard Error: 2_674
            .saturating_add(Weight::from_parts(84_643, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:1)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[1, 31]`.
    fn remove_proxy(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `90 + p * (41 ±0)`
        //  Estimated: `4834`
        // Minimum execution time: 28_402 nanoseconds.
        Weight::from_parts(30_152_688, 4834)
            // Standard Error: 6_694
            .saturating_add(Weight::from_parts(58_729, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:1)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[1, 31]`.
    fn remove_proxies(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `90 + p * (41 ±0)`
        //  Estimated: `4834`
        // Minimum execution time: 24_841 nanoseconds.
        Weight::from_parts(26_374_369, 4834)
            // Standard Error: 2_688
            .saturating_add(Weight::from_parts(59_030, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:1)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[1, 31]`.
    fn create_pure(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `102`
        //  Estimated: `4834`
        // Minimum execution time: 30_170 nanoseconds.
        Weight::from_parts(31_864_079, 4834)
            // Standard Error: 2_968
            .saturating_add(Weight::from_parts(24_233, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Proxy::Proxies` (r:1 w:1)
    /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1369), added: 3844, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[0, 30]`.
    fn kill_pure(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `131 + p * (41 ±0)`
        //  Estimated: `4834`
        // Minimum execution time: 26_161 nanoseconds.
        Weight::from_parts(28_166_282, 4834)
            // Standard Error: 9_964
            .saturating_add(Weight::from_parts(29_517, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
}
