Unverified Commit 91fe0da0 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

Companion PR for #7138 (WeightInfo for Scheduler) (#1734)

* Update scheduler from substrate

* "Update Substrate"

Co-authored-by: parity-processbot <>
parent d985bde7
Pipeline #107607 passed with stages
in 22 minutes and 59 seconds
This diff is collapsed.
......@@ -152,6 +152,10 @@ impl frame_system::Trait for Runtime {
type SystemWeightInfo = weights::frame_system::WeightInfo;
}
parameter_types! {
pub const MaxScheduledPerBlock: u32 = 50;
}
impl pallet_scheduler::Trait for Runtime {
type Event = Event;
type Origin = Origin;
......@@ -159,7 +163,8 @@ impl pallet_scheduler::Trait for Runtime {
type Call = Call;
type MaximumWeight = MaximumBlockWeight;
type ScheduleOrigin = EnsureRoot<AccountId>;
type WeightInfo = ();
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo;
}
parameter_types! {
......
......@@ -21,6 +21,7 @@ pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_democracy;
pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_treasury;
......
// Copyright (C) 2020 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.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
impl pallet_scheduler::WeightInfo for WeightInfo {
fn schedule(s: u32, ) -> Weight {
(37_835_000 as Weight)
.saturating_add((81_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(1 as Weight))
}
fn cancel(s: u32, ) -> Weight {
(34_707_000 as Weight)
.saturating_add((3_125_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn schedule_named(s: u32, ) -> Weight {
(48_065_000 as Weight)
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_named(s: u32, ) -> Weight {
(38_776_000 as Weight)
.saturating_add((3_138_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
}
......@@ -170,6 +170,10 @@ impl frame_system::Trait for Runtime {
type SystemWeightInfo = weights::frame_system::WeightInfo;
}
parameter_types! {
pub const MaxScheduledPerBlock: u32 = 50;
}
impl pallet_scheduler::Trait for Runtime {
type Event = Event;
type Origin = Origin;
......@@ -177,7 +181,8 @@ impl pallet_scheduler::Trait for Runtime {
type Call = Call;
type MaximumWeight = MaximumBlockWeight;
type ScheduleOrigin = EnsureRoot<AccountId>;
type WeightInfo = ();
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo;
}
parameter_types! {
......
......@@ -21,6 +21,7 @@ pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_democracy;
pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_treasury;
......
// Copyright (C) 2020 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.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
impl pallet_scheduler::WeightInfo for WeightInfo {
fn schedule(s: u32, ) -> Weight {
(37_835_000 as Weight)
.saturating_add((81_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(1 as Weight))
}
fn cancel(s: u32, ) -> Weight {
(34_707_000 as Weight)
.saturating_add((3_125_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn schedule_named(s: u32, ) -> Weight {
(48_065_000 as Weight)
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_named(s: u32, ) -> Weight {
(38_776_000 as Weight)
.saturating_add((3_138_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
}
......@@ -143,6 +143,10 @@ impl frame_system::Trait for Runtime {
type SystemWeightInfo = weights::frame_system::WeightInfo;
}
parameter_types! {
pub const MaxScheduledPerBlock: u32 = 50;
}
impl pallet_scheduler::Trait for Runtime {
type Event = Event;
type Origin = Origin;
......@@ -150,7 +154,8 @@ impl pallet_scheduler::Trait for Runtime {
type Call = Call;
type MaximumWeight = MaximumBlockWeight;
type ScheduleOrigin = EnsureRoot<AccountId>;
type WeightInfo = ();
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo;
}
parameter_types! {
......
......@@ -19,6 +19,7 @@
pub mod frame_system;
pub mod pallet_balances;
pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_utility;
// Copyright (C) 2020 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.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
impl pallet_scheduler::WeightInfo for WeightInfo {
fn schedule(s: u32, ) -> Weight {
(37_835_000 as Weight)
.saturating_add((81_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(1 as Weight))
}
fn cancel(s: u32, ) -> Weight {
(34_707_000 as Weight)
.saturating_add((3_125_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn schedule_named(s: u32, ) -> Weight {
(48_065_000 as Weight)
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_named(s: u32, ) -> Weight {
(38_776_000 as Weight)
.saturating_add((3_138_000 as Weight).saturating_mul(s as Weight))
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment