// 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_identity
//!
//! 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_identity
// --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_identity (automatically generated)
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_identity::weights::WeightInfo for WeightInfo<T> {
    /// Storage: `Identity::Registrars` (r:1 w:1)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 7]`.
    fn add_registrar(r: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `32 + r * (57 ±0)`
        //  Estimated: `1942`
        // Minimum execution time: 14_090 nanoseconds.
        Weight::from_parts(14_986_112, 1942)
            // Standard Error: 9_527
            .saturating_add(Weight::from_parts(209_502, 0).saturating_mul(r.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 8]`.
    /// The range of component `x` is `[0, 64]`.
    fn set_identity(r: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `442 + r * (5 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 23_400 nanoseconds.
        Weight::from_parts(34_675_788, 8303)
            // Standard Error: 30_978
            .saturating_add(Weight::from_parts(390_774, 0).saturating_mul(r.into()))
            // Standard Error: 3_598
            .saturating_add(Weight::from_parts(647_168, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:0)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:64 w:64)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// The range of component `s` is `[0, 64]`.
    fn set_subs_new(s: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `101`
        //  Estimated: `8303 + s * (2589 ±0)`
        // Minimum execution time: 10_940 nanoseconds.
        Weight::from_parts(29_044_098, 8303)
            // Standard Error: 11_640
            .saturating_add(Weight::from_parts(4_158_409, 0).saturating_mul(s.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
            .saturating_add(T::DbWeight::get().writes(1))
            .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
            .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:0)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:0 w:64)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// The range of component `p` is `[0, 64]`.
    fn set_subs_old(p: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `194 + p * (32 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 11_140 nanoseconds.
        Weight::from_parts(26_473_153, 8303)
            // Standard Error: 6_252
            .saturating_add(Weight::from_parts(1_736_112, 0).saturating_mul(p.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(1))
            .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
    }
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:0 w:64)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 8]`.
    /// The range of component `s` is `[0, 64]`.
    /// The range of component `x` is `[0, 64]`.
    fn clear_identity(r: u32, s: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `471 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 56_431 nanoseconds.
        Weight::from_parts(36_897_307, 8303)
            // Standard Error: 53_016
            .saturating_add(Weight::from_parts(190_947, 0).saturating_mul(r.into()))
            // Standard Error: 6_173
            .saturating_add(Weight::from_parts(1_747_584, 0).saturating_mul(s.into()))
            // Standard Error: 6_173
            .saturating_add(Weight::from_parts(335_739, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(2))
            .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
    }
    /// Storage: `Identity::Registrars` (r:1 w:0)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 8]`.
    /// The range of component `x` is `[0, 64]`.
    fn request_judgement(r: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `367 + r * (57 ±0) + x * (66 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 37_161 nanoseconds.
        Weight::from_parts(35_806_339, 8303)
            // Standard Error: 32_403
            .saturating_add(Weight::from_parts(347_030, 0).saturating_mul(r.into()))
            // Standard Error: 3_763
            .saturating_add(Weight::from_parts(669_233, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 8]`.
    /// The range of component `x` is `[0, 64]`.
    fn cancel_request(r: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `398 + x * (66 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 34_651 nanoseconds.
        Weight::from_parts(34_913_667, 8303)
            // Standard Error: 18_225
            .saturating_add(Weight::from_parts(117_675, 0).saturating_mul(r.into()))
            // Standard Error: 2_116
            .saturating_add(Weight::from_parts(636_465, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::Registrars` (r:1 w:1)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 7]`.
    fn set_fee(r: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `89 + r * (57 ±0)`
        //  Estimated: `1942`
        // Minimum execution time: 9_151 nanoseconds.
        Weight::from_parts(9_889_249, 1942)
            // Standard Error: 5_583
            .saturating_add(Weight::from_parts(178_604, 0).saturating_mul(r.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::Registrars` (r:1 w:1)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 7]`.
    fn set_account_id(r: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `89 + r * (57 ±0)`
        //  Estimated: `1942`
        // Minimum execution time: 8_310 nanoseconds.
        Weight::from_parts(9_046_755, 1942)
            // Standard Error: 5_582
            .saturating_add(Weight::from_parts(123_880, 0).saturating_mul(r.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::Registrars` (r:1 w:1)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 7]`.
    fn set_fields(r: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `89 + r * (57 ±0)`
        //  Estimated: `1942`
        // Minimum execution time: 8_171 nanoseconds.
        Weight::from_parts(8_747_308, 1942)
            // Standard Error: 5_873
            .saturating_add(Weight::from_parts(162_510, 0).saturating_mul(r.into()))
            .saturating_add(T::DbWeight::get().reads(1))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::Registrars` (r:1 w:0)
    /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(457), added: 952, mode: `MaxEncodedLen`)
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 7]`.
    /// The range of component `x` is `[0, 64]`.
    fn provide_judgement(_r: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `445 + r * (57 ±0) + x * (66 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 25_832 nanoseconds.
        Weight::from_parts(27_647_734, 8303)
            // Standard Error: 3_835
            .saturating_add(Weight::from_parts(1_016_392, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// Storage: `Identity::IdentityOf` (r:1 w:1)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:2 w:2)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:0 w:64)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// The range of component `r` is `[1, 8]`.
    /// The range of component `s` is `[0, 64]`.
    /// The range of component `x` is `[0, 64]`.
    fn kill_identity(r: u32, s: u32, x: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `826 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 79_812 nanoseconds.
        Weight::from_parts(60_363_180, 8303)
            // Standard Error: 51_080
            .saturating_add(Weight::from_parts(146_545, 0).saturating_mul(r.into()))
            // Standard Error: 5_948
            .saturating_add(Weight::from_parts(1_756_611, 0).saturating_mul(s.into()))
            // Standard Error: 5_948
            .saturating_add(Weight::from_parts(356_991, 0).saturating_mul(x.into()))
            .saturating_add(T::DbWeight::get().reads(4))
            .saturating_add(T::DbWeight::get().writes(4))
            .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:0)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:1 w:1)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// The range of component `s` is `[0, 63]`.
    fn add_sub(s: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `323 + s * (41 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 34_070 nanoseconds.
        Weight::from_parts(39_664_475, 8303)
            // Standard Error: 5_065
            .saturating_add(Weight::from_parts(103_964, 0).saturating_mul(s.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:0)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:1 w:1)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// The range of component `s` is `[1, 64]`.
    fn rename_sub(s: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `432 + s * (7 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 14_980 nanoseconds.
        Weight::from_parts(17_574_120, 8303)
            // Standard Error: 1_703
            .saturating_add(Weight::from_parts(39_579, 0).saturating_mul(s.into()))
            .saturating_add(T::DbWeight::get().reads(2))
            .saturating_add(T::DbWeight::get().writes(1))
    }
    /// Storage: `Identity::IdentityOf` (r:1 w:0)
    /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(4838), added: 7313, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SuperOf` (r:1 w:1)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// The range of component `s` is `[1, 64]`.
    fn remove_sub(s: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `480 + s * (39 ±0)`
        //  Estimated: `8303`
        // Minimum execution time: 38_051 nanoseconds.
        Weight::from_parts(40_609_060, 8303)
            // Standard Error: 2_471
            .saturating_add(Weight::from_parts(93_132, 0).saturating_mul(s.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(2))
    }
    /// Storage: `Identity::SuperOf` (r:1 w:1)
    /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
    /// Storage: `Identity::SubsOf` (r:1 w:1)
    /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(2106), added: 4581, mode: `MaxEncodedLen`)
    /// Storage: `System::Account` (r:1 w:0)
    /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
    /// The range of component `s` is `[0, 63]`.
    fn quit_sub(s: u32) -> Weight {
        // Proof Size summary in bytes:
        //  Measured:  `583 + s * (42 ±0)`
        //  Estimated: `5571`
        // Minimum execution time: 28_860 nanoseconds.
        Weight::from_parts(31_107_615, 5571)
            // Standard Error: 2_093
            .saturating_add(Weight::from_parts(105_202, 0).saturating_mul(s.into()))
            .saturating_add(T::DbWeight::get().reads(3))
            .saturating_add(T::DbWeight::get().writes(2))
    }
}
