// This file is part of Substrate.

// Copyright (C) 2021 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for pallet_scheduler
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-08-21, STEPS: `100`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 512
//! HOSTNAME: `ubuntu-8gb-nbg1-1-bench2`, CPU: `AMD EPYC-Milan Processor`

// Executed Command:
// ./polymesh
// benchmark
// pallet
// -s
// 100
// -r
// 5
// -p=*
// -e=*
// --heap-pages
// 4096
// --db-cache
// 512
// --execution
// wasm
// --wasm-execution
// compiled
// --output
// ./Polymesh/pallets/weights/src/
// --template
// ./Polymesh/.maintain/frame-weight-template.hbs

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

use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};

/// Weights for pallet_scheduler using the Substrate node and recommended hardware.
pub struct SubstrateWeight;
impl pallet_scheduler::WeightInfo for SubstrateWeight {
    // Storage: Scheduler IncompleteSince (r:1 w:1)
    // Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
    fn service_agendas_base() -> Weight {
        // Minimum execution time: 4_407 nanoseconds.
        Weight::from_ref_time(4_467_000)
            .saturating_add(DbWeight::get().reads(1))
            .saturating_add(DbWeight::get().writes(1))
    }
    // Storage: Scheduler Agenda (r:1 w:1)
    // Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen)
    /// The range of component `s` is `[0, 50]`.
    fn service_agenda_base(s: u32) -> Weight {
        // Minimum execution time: 4_016 nanoseconds.
        Weight::from_ref_time(8_590_172)
            // Standard Error: 3_991
            .saturating_add(Weight::from_ref_time(442_495).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(1))
            .saturating_add(DbWeight::get().writes(1))
    }
    fn service_task_base() -> Weight {
        // Minimum execution time: 5_648 nanoseconds.
        Weight::from_ref_time(7_351_000)
    }
    // Storage: Preimage PreimageFor (r:1 w:1)
    // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)
    // Storage: Preimage StatusFor (r:1 w:1)
    // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
    /// The range of component `s` is `[128, 4194304]`.
    fn service_task_fetched(s: u32) -> Weight {
        // Minimum execution time: 23_546 nanoseconds.
        Weight::from_ref_time(23_745_000)
            // Standard Error: 1
            .saturating_add(Weight::from_ref_time(726).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(2))
            .saturating_add(DbWeight::get().writes(2))
    }
    // Storage: Scheduler Lookup (r:0 w:1)
    // Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
    fn service_task_named() -> Weight {
        // Minimum execution time: 7_532 nanoseconds.
        Weight::from_ref_time(9_163_000).saturating_add(DbWeight::get().writes(1))
    }
    fn service_task_periodic() -> Weight {
        // Minimum execution time: 5_668 nanoseconds.
        Weight::from_ref_time(5_919_000)
    }
    fn execute_dispatch_signed() -> Weight {
        // Minimum execution time: 2_774 nanoseconds.
        Weight::from_ref_time(3_045_000)
    }
    fn execute_dispatch_unsigned() -> Weight {
        // Minimum execution time: 2_824 nanoseconds.
        Weight::from_ref_time(3_866_000)
    }
    // Storage: Scheduler Agenda (r:1 w:1)
    // Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen)
    /// The range of component `s` is `[0, 49]`.
    fn schedule(s: u32) -> Weight {
        // Minimum execution time: 13_841 nanoseconds.
        Weight::from_ref_time(20_422_551)
            // Standard Error: 16_101
            .saturating_add(Weight::from_ref_time(483_238).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(1))
            .saturating_add(DbWeight::get().writes(1))
    }
    // Storage: Scheduler Agenda (r:1 w:1)
    // Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen)
    // Storage: Scheduler Lookup (r:0 w:1)
    // Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
    /// The range of component `s` is `[1, 50]`.
    fn cancel(s: u32) -> Weight {
        // Minimum execution time: 18_758 nanoseconds.
        Weight::from_ref_time(20_987_175)
            // Standard Error: 8_609
            .saturating_add(Weight::from_ref_time(720_451).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(1))
            .saturating_add(DbWeight::get().writes(2))
    }
    // Storage: Scheduler Lookup (r:1 w:1)
    // Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
    // Storage: Scheduler Agenda (r:1 w:1)
    // Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen)
    /// The range of component `s` is `[0, 49]`.
    fn schedule_named(s: u32) -> Weight {
        // Minimum execution time: 17_887 nanoseconds.
        Weight::from_ref_time(26_275_121)
            // Standard Error: 18_054
            .saturating_add(Weight::from_ref_time(513_653).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(2))
            .saturating_add(DbWeight::get().writes(2))
    }
    // Storage: Scheduler Lookup (r:1 w:1)
    // Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
    // Storage: Scheduler Agenda (r:1 w:1)
    // Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen)
    /// The range of component `s` is `[1, 50]`.
    fn cancel_named(s: u32) -> Weight {
        // Minimum execution time: 20_521 nanoseconds.
        Weight::from_ref_time(24_234_469)
            // Standard Error: 14_733
            .saturating_add(Weight::from_ref_time(770_371).saturating_mul(s.into()))
            .saturating_add(DbWeight::get().reads(2))
            .saturating_add(DbWeight::get().writes(2))
    }
}
