mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
FRAME Weights with Storage Metadata (#9471)
* weights with metadata * fix * fix contract test * skip metadata tag * special handling for `frame_system` * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs * add skip metadata to contracts * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix contract test * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs * expose component information * fix test generation * refactor list benchmarks * move component selection out of runtime * add benchmark verification * missing feature * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs * add internal repeats * update weights with internal repeats * fix warning * return error with pov * try without tracking * Revert "return error with pov" This reverts commit 44c36cbbd3c6818f36f377e3e291f1df156e40f7. * Revert "try without tracking" This reverts commit f401c44aebff2232389d8d307b20924891e5d77d. * Revert "Revert "try without tracking"" This reverts commit 4b4e05929802ad3e8154e107359447634e5fb21b. * state without tracking * fix build * temp test * split db and timing benchmarks * extend db results? * default repeat is internal * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix warning * bump linked hash map * use linked hash map for storage tracker * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs * remove conflicting short command * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs * missed one linked hashmap * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * new weights with latest changes * Update frame/benchmarking/src/utils.rs Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -46,7 +46,11 @@ pub trait WeightInfo {
|
||||
|
||||
/// Weights for {{pallet}} using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
{{~#if (eq pallet "frame_system")}}
|
||||
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
|
||||
{{~else}}
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
{{~/if}}
|
||||
{{~#each benchmarks as |benchmark|}}
|
||||
{{~#each benchmark.comments as |comment|}}
|
||||
// {{comment}}
|
||||
|
||||
@@ -18,7 +18,7 @@ log = "0.4.8"
|
||||
kvdb = "0.10.0"
|
||||
kvdb-rocksdb = { version = "0.12.0", optional = true }
|
||||
kvdb-memorydb = "0.10.0"
|
||||
linked-hash-map = "0.5.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
hash-db = "0.15.2"
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["std"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
|
||||
@@ -27,6 +27,7 @@ use std::{
|
||||
use crate::storage_cache::{new_shared_cache, CachingState, SharedCache};
|
||||
use hash_db::{Hasher, Prefix};
|
||||
use kvdb::{DBTransaction, KeyValueDB};
|
||||
use linked_hash_map::LinkedHashMap;
|
||||
use sp_core::{
|
||||
hexdisplay::HexDisplay,
|
||||
storage::{ChildInfo, TrackedStorageKey},
|
||||
@@ -72,7 +73,6 @@ impl<Block: BlockT> sp_state_machine::Storage<HashFor<Block>> for StorageDb<Bloc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// State that manages the backend database reference. Allows runtime to control the database.
|
||||
pub struct BenchmarkingState<B: BlockT> {
|
||||
root: Cell<B::Hash>,
|
||||
@@ -85,15 +85,16 @@ pub struct BenchmarkingState<B: BlockT> {
|
||||
/// Key tracker for keys in the main trie.
|
||||
/// We track the total number of reads and writes to these keys,
|
||||
/// not de-duplicated for repeats.
|
||||
main_key_tracker: RefCell<HashMap<Vec<u8>, TrackedStorageKey>>,
|
||||
main_key_tracker: RefCell<LinkedHashMap<Vec<u8>, TrackedStorageKey>>,
|
||||
/// Key tracker for keys in a child trie.
|
||||
/// Child trie are identified by their storage key (i.e. `ChildInfo::storage_key()`)
|
||||
/// We track the total number of reads and writes to these keys,
|
||||
/// not de-duplicated for repeats.
|
||||
child_key_tracker: RefCell<HashMap<Vec<u8>, HashMap<Vec<u8>, TrackedStorageKey>>>,
|
||||
child_key_tracker: RefCell<LinkedHashMap<Vec<u8>, LinkedHashMap<Vec<u8>, TrackedStorageKey>>>,
|
||||
whitelist: RefCell<Vec<TrackedStorageKey>>,
|
||||
proof_recorder: Option<ProofRecorder<B::Hash>>,
|
||||
proof_recorder_root: Cell<B::Hash>,
|
||||
enable_tracking: bool,
|
||||
}
|
||||
|
||||
impl<B: BlockT> BenchmarkingState<B> {
|
||||
@@ -102,6 +103,7 @@ impl<B: BlockT> BenchmarkingState<B> {
|
||||
genesis: Storage,
|
||||
_cache_size_mb: Option<usize>,
|
||||
record_proof: bool,
|
||||
enable_tracking: bool,
|
||||
) -> Result<Self, String> {
|
||||
let mut root = B::Hash::default();
|
||||
let mut mdb = MemoryDB::<HashFor<B>>::default();
|
||||
@@ -120,6 +122,7 @@ impl<B: BlockT> BenchmarkingState<B> {
|
||||
whitelist: Default::default(),
|
||||
proof_recorder: record_proof.then(Default::default),
|
||||
proof_recorder_root: Cell::new(root.clone()),
|
||||
enable_tracking,
|
||||
};
|
||||
|
||||
state.add_whitelist_to_tracker();
|
||||
@@ -180,18 +183,24 @@ impl<B: BlockT> BenchmarkingState<B> {
|
||||
}
|
||||
|
||||
fn wipe_tracker(&self) {
|
||||
*self.main_key_tracker.borrow_mut() = HashMap::new();
|
||||
*self.child_key_tracker.borrow_mut() = HashMap::new();
|
||||
*self.main_key_tracker.borrow_mut() = LinkedHashMap::new();
|
||||
*self.child_key_tracker.borrow_mut() = LinkedHashMap::new();
|
||||
self.add_whitelist_to_tracker();
|
||||
}
|
||||
|
||||
// Childtrie is identified by its storage key (i.e. `ChildInfo::storage_key`)
|
||||
fn add_read_key(&self, childtrie: Option<&[u8]>, key: &[u8]) {
|
||||
if !self.enable_tracking {
|
||||
return
|
||||
}
|
||||
|
||||
let mut child_key_tracker = self.child_key_tracker.borrow_mut();
|
||||
let mut main_key_tracker = self.main_key_tracker.borrow_mut();
|
||||
|
||||
let key_tracker = if let Some(childtrie) = childtrie {
|
||||
child_key_tracker.entry(childtrie.to_vec()).or_insert_with(|| HashMap::new())
|
||||
child_key_tracker
|
||||
.entry(childtrie.to_vec())
|
||||
.or_insert_with(|| LinkedHashMap::new())
|
||||
} else {
|
||||
&mut main_key_tracker
|
||||
};
|
||||
@@ -224,11 +233,17 @@ impl<B: BlockT> BenchmarkingState<B> {
|
||||
|
||||
// Childtrie is identified by its storage key (i.e. `ChildInfo::storage_key`)
|
||||
fn add_write_key(&self, childtrie: Option<&[u8]>, key: &[u8]) {
|
||||
if !self.enable_tracking {
|
||||
return
|
||||
}
|
||||
|
||||
let mut child_key_tracker = self.child_key_tracker.borrow_mut();
|
||||
let mut main_key_tracker = self.main_key_tracker.borrow_mut();
|
||||
|
||||
let key_tracker = if let Some(childtrie) = childtrie {
|
||||
child_key_tracker.entry(childtrie.to_vec()).or_insert_with(|| HashMap::new())
|
||||
child_key_tracker
|
||||
.entry(childtrie.to_vec())
|
||||
.or_insert_with(|| LinkedHashMap::new())
|
||||
} else {
|
||||
&mut main_key_tracker
|
||||
};
|
||||
@@ -553,7 +568,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for BenchmarkingState<B> {
|
||||
// We only track at the level of a key-prefix and not whitelisted for now for memory size.
|
||||
// TODO: Refactor to enable full storage key transparency, where we can remove the
|
||||
// `prefix_key_tracker`.
|
||||
let mut prefix_key_tracker = HashMap::<Vec<u8>, (u32, u32, bool)>::new();
|
||||
let mut prefix_key_tracker = LinkedHashMap::<Vec<u8>, (u32, u32, bool)>::new();
|
||||
self.all_trackers().iter().for_each(|tracker| {
|
||||
if !tracker.whitelisted {
|
||||
let prefix_length = tracker.key.len().min(32);
|
||||
@@ -629,7 +644,8 @@ mod test {
|
||||
#[test]
|
||||
fn read_to_main_and_child_tries() {
|
||||
let bench_state =
|
||||
BenchmarkingState::<crate::tests::Block>::new(Default::default(), None, false).unwrap();
|
||||
BenchmarkingState::<crate::tests::Block>::new(Default::default(), None, false, true)
|
||||
.unwrap();
|
||||
|
||||
for _ in 0..2 {
|
||||
let child1 = sp_core::storage::ChildInfo::new_default(b"child1");
|
||||
|
||||
@@ -46,7 +46,7 @@ prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../..
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
|
||||
finality-grandpa = { version = "0.14.1", features = ["derive-codec"] }
|
||||
pin-project = "1.0.4"
|
||||
linked-hash-map = "0.5.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
async-trait = "0.1.50"
|
||||
wasm-timer = "0.2"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ futures-timer = "3.0.2"
|
||||
asynchronous-codec = "0.5"
|
||||
hex = "0.4.0"
|
||||
ip_network = "0.3.4"
|
||||
linked-hash-map = "0.5.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
linked_hash_set = "0.1.3"
|
||||
lru = "0.6.5"
|
||||
log = "0.4.8"
|
||||
|
||||
@@ -33,7 +33,7 @@ sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
wasm-timer = "0.2"
|
||||
derive_more = "0.99.2"
|
||||
serde = { version = "1.0.126", features = ["derive"] }
|
||||
linked-hash-map = "0.5.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
retain_mut = "0.1.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -26,7 +26,7 @@ sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-transaction-pool = { version = "4.0.0-dev", path = "../../../primitives/transaction-pool" }
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
|
||||
linked-hash-map = "0.5.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
retain_mut = "0.1.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_assets
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -73,24 +73,31 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_assets using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn create() -> Weight {
|
||||
(43_277_000 as Weight)
|
||||
(41_651_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn force_create() -> Weight {
|
||||
(21_829_000 as Weight)
|
||||
(21_378_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:5002 w:5001)
|
||||
// Storage: System Account (r:5000 w:5000)
|
||||
// Storage: Assets Metadata (r:1 w:0)
|
||||
// Storage: Assets Approvals (r:501 w:500)
|
||||
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((22_206_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((28_086_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 346_000
|
||||
.saturating_add((32_168_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((21_163_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((26_932_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 329_000
|
||||
.saturating_add((29_714_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
@@ -100,107 +107,150 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn mint() -> Weight {
|
||||
(45_983_000 as Weight)
|
||||
(47_913_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn burn() -> Weight {
|
||||
(52_925_000 as Weight)
|
||||
(55_759_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(80_375_000 as Weight)
|
||||
(83_205_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
(67_688_000 as Weight)
|
||||
(70_665_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_transfer() -> Weight {
|
||||
(80_267_000 as Weight)
|
||||
(81_458_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn freeze() -> Weight {
|
||||
(30_541_000 as Weight)
|
||||
(32_845_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
(30_494_000 as Weight)
|
||||
(33_303_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn freeze_asset() -> Weight {
|
||||
(22_025_000 as Weight)
|
||||
(23_434_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn thaw_asset() -> Weight {
|
||||
(21_889_000 as Weight)
|
||||
(24_173_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Metadata (r:1 w:0)
|
||||
fn transfer_ownership() -> Weight {
|
||||
(24_939_000 as Weight)
|
||||
(27_466_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn set_team() -> Weight {
|
||||
(21_959_000 as Weight)
|
||||
(24_608_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_metadata(_n: u32, s: u32, ) -> Weight {
|
||||
(47_510_000 as Weight)
|
||||
// Standard Error: 0
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
(49_515_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((6_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn clear_metadata() -> Weight {
|
||||
(46_085_000 as Weight)
|
||||
(48_163_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
|
||||
(24_297_000 as Weight)
|
||||
(26_722_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((7_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((5_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn force_clear_metadata() -> Weight {
|
||||
(45_787_000 as Weight)
|
||||
(47_923_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn force_asset_status() -> Weight {
|
||||
(20_574_000 as Weight)
|
||||
(23_081_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn approve_transfer() -> Weight {
|
||||
(53_893_000 as Weight)
|
||||
(56_998_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_approved() -> Weight {
|
||||
(106_171_000 as Weight)
|
||||
(107_171_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn cancel_approval() -> Weight {
|
||||
(55_213_000 as Weight)
|
||||
(57_358_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn force_cancel_approval() -> Weight {
|
||||
(55_946_000 as Weight)
|
||||
(58_330_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -208,24 +258,31 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn create() -> Weight {
|
||||
(43_277_000 as Weight)
|
||||
(41_651_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn force_create() -> Weight {
|
||||
(21_829_000 as Weight)
|
||||
(21_378_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:5002 w:5001)
|
||||
// Storage: System Account (r:5000 w:5000)
|
||||
// Storage: Assets Metadata (r:1 w:0)
|
||||
// Storage: Assets Approvals (r:501 w:500)
|
||||
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((22_206_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((28_086_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 346_000
|
||||
.saturating_add((32_168_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((21_163_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((26_932_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 329_000
|
||||
.saturating_add((29_714_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
@@ -235,107 +292,150 @@ impl WeightInfo for () {
|
||||
.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn mint() -> Weight {
|
||||
(45_983_000 as Weight)
|
||||
(47_913_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn burn() -> Weight {
|
||||
(52_925_000 as Weight)
|
||||
(55_759_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(80_375_000 as Weight)
|
||||
(83_205_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
(67_688_000 as Weight)
|
||||
(70_665_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_transfer() -> Weight {
|
||||
(80_267_000 as Weight)
|
||||
(81_458_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn freeze() -> Weight {
|
||||
(30_541_000 as Weight)
|
||||
(32_845_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Account (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
(30_494_000 as Weight)
|
||||
(33_303_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn freeze_asset() -> Weight {
|
||||
(22_025_000 as Weight)
|
||||
(23_434_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn thaw_asset() -> Weight {
|
||||
(21_889_000 as Weight)
|
||||
(24_173_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Metadata (r:1 w:0)
|
||||
fn transfer_ownership() -> Weight {
|
||||
(24_939_000 as Weight)
|
||||
(27_466_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn set_team() -> Weight {
|
||||
(21_959_000 as Weight)
|
||||
(24_608_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_metadata(_n: u32, s: u32, ) -> Weight {
|
||||
(47_510_000 as Weight)
|
||||
// Standard Error: 0
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
(49_515_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((6_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn clear_metadata() -> Weight {
|
||||
(46_085_000 as Weight)
|
||||
(48_163_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
|
||||
(24_297_000 as Weight)
|
||||
(26_722_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((7_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((5_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:0)
|
||||
// Storage: Assets Metadata (r:1 w:1)
|
||||
fn force_clear_metadata() -> Weight {
|
||||
(45_787_000 as Weight)
|
||||
(47_923_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
fn force_asset_status() -> Weight {
|
||||
(20_574_000 as Weight)
|
||||
(23_081_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn approve_transfer() -> Weight {
|
||||
(53_893_000 as Weight)
|
||||
(56_998_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_approved() -> Weight {
|
||||
(106_171_000 as Weight)
|
||||
(107_171_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn cancel_approval() -> Weight {
|
||||
(55_213_000 as Weight)
|
||||
(57_358_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Assets Asset (r:1 w:1)
|
||||
// Storage: Assets Approvals (r:1 w:1)
|
||||
fn force_cancel_approval() -> Weight {
|
||||
(55_946_000 as Weight)
|
||||
(58_330_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_balances
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -58,37 +58,37 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(78_358_000 as Weight)
|
||||
(72_229_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
(59_001_000 as Weight)
|
||||
(55_013_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_creating() -> Weight {
|
||||
(32_698_000 as Weight)
|
||||
(29_404_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_killing() -> Weight {
|
||||
(38_746_000 as Weight)
|
||||
(36_311_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn force_transfer() -> Weight {
|
||||
(77_622_000 as Weight)
|
||||
(73_125_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_all() -> Weight {
|
||||
(72_020_000 as Weight)
|
||||
(67_749_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -98,37 +98,37 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
impl WeightInfo for () {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(78_358_000 as Weight)
|
||||
(72_229_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
(59_001_000 as Weight)
|
||||
(55_013_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_creating() -> Weight {
|
||||
(32_698_000 as Weight)
|
||||
(29_404_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_killing() -> Weight {
|
||||
(38_746_000 as Weight)
|
||||
(36_311_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn force_transfer() -> Weight {
|
||||
(77_622_000 as Weight)
|
||||
(73_125_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_all() -> Weight {
|
||||
(72_020_000 as Weight)
|
||||
(67_749_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ macro_rules! benchmarks {
|
||||
{ }
|
||||
( )
|
||||
( )
|
||||
( )
|
||||
$( $rest )*
|
||||
);
|
||||
}
|
||||
@@ -208,6 +209,7 @@ macro_rules! benchmarks_instance {
|
||||
{ }
|
||||
( )
|
||||
( )
|
||||
( )
|
||||
$( $rest )*
|
||||
);
|
||||
}
|
||||
@@ -226,6 +228,7 @@ macro_rules! benchmarks_instance_pallet {
|
||||
{ }
|
||||
( )
|
||||
( )
|
||||
( )
|
||||
$( $rest )*
|
||||
);
|
||||
}
|
||||
@@ -240,6 +243,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
where_clause { where $( $where_bound:tt )* }
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
@@ -248,15 +252,38 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_bound )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$( $rest )*
|
||||
}
|
||||
};
|
||||
// detect and extract extra tag:
|
||||
// detect and extract `#[skip_meta]` tag:
|
||||
(
|
||||
{ $( $instance:ident: $instance_bound:tt )? }
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
#[skip_meta]
|
||||
$name:ident
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
$crate::benchmarks_iter! {
|
||||
{ $( $instance: $instance_bound )? }
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* $name )
|
||||
$name
|
||||
$( $rest )*
|
||||
}
|
||||
};
|
||||
// detect and extract `#[extra] tag:
|
||||
(
|
||||
{ $( $instance:ident: $instance_bound:tt )? }
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
#[extra]
|
||||
$name:ident
|
||||
$( $rest:tt )*
|
||||
@@ -266,6 +293,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* $name )
|
||||
( $( $names_skip_meta )* )
|
||||
$name
|
||||
$( $rest )*
|
||||
}
|
||||
@@ -276,6 +304,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* ) // This contains $( $( { $instance } )? $name:ident )*
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: _ ( $origin:expr $( , $arg:expr )* )
|
||||
verify $postcode:block
|
||||
$( $rest:tt )*
|
||||
@@ -285,6 +314,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$name { $( $code )* }: $name ( $origin $( , $arg )* )
|
||||
verify $postcode
|
||||
$( $rest )*
|
||||
@@ -296,6 +326,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: $dispatch:ident ( $origin:expr $( , $arg:expr )* )
|
||||
verify $postcode:block
|
||||
$( $rest:tt )*
|
||||
@@ -305,6 +336,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$name {
|
||||
$( $code )*
|
||||
let __benchmarked_call_encoded = $crate::frame_support::codec::Encode::encode(
|
||||
@@ -331,6 +363,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: $eval:block
|
||||
verify $postcode:block
|
||||
$( $rest:tt )*
|
||||
@@ -357,6 +390,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* { $( $instance )? } $name )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$( $rest )*
|
||||
);
|
||||
};
|
||||
@@ -366,6 +400,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
) => {
|
||||
$crate::selected_benchmark!(
|
||||
{ $( $where_clause)* }
|
||||
@@ -377,6 +412,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $instance: $instance_bound )? }
|
||||
( $( $names )* )
|
||||
( $( $names_extra ),* )
|
||||
( $( $names_skip_meta ),* )
|
||||
);
|
||||
};
|
||||
// add verify block to _() format
|
||||
@@ -385,6 +421,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: _ ( $origin:expr $( , $arg:expr )* )
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
@@ -393,6 +430,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$name { $( $code )* }: _ ( $origin $( , $arg )* )
|
||||
verify { }
|
||||
$( $rest )*
|
||||
@@ -404,6 +442,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: $dispatch:ident ( $origin:expr $( , $arg:expr )* )
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
@@ -412,6 +451,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$name { $( $code )* }: $dispatch ( $origin $( , $arg )* )
|
||||
verify { }
|
||||
$( $rest )*
|
||||
@@ -423,6 +463,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause:tt )* }
|
||||
( $( $names:tt )* )
|
||||
( $( $names_extra:tt )* )
|
||||
( $( $names_skip_meta:tt )* )
|
||||
$name:ident { $( $code:tt )* }: $eval:block
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
@@ -431,6 +472,7 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
( $( $names_skip_meta )* )
|
||||
$name { $( $code )* }: $eval
|
||||
verify { }
|
||||
$( $rest )*
|
||||
@@ -696,28 +738,40 @@ macro_rules! impl_benchmark {
|
||||
{ $( $instance:ident: $instance_bound:tt )? }
|
||||
( $( { $( $name_inst:ident )? } $name:ident )* )
|
||||
( $( $name_extra:ident ),* )
|
||||
( $( $name_skip_meta:ident ),* )
|
||||
) => {
|
||||
impl<T: Config $(<$instance>, $instance: $instance_bound )? >
|
||||
$crate::Benchmarking<$crate::BenchmarkResults> for Pallet<T $(, $instance)? >
|
||||
where T: frame_system::Config, $( $where_clause )*
|
||||
{
|
||||
fn benchmarks(extra: bool) -> $crate::Vec<&'static [u8]> {
|
||||
let mut all = $crate::vec![ $( stringify!($name).as_ref() ),* ];
|
||||
fn benchmarks(extra: bool) -> $crate::Vec<$crate::BenchmarkMetadata> {
|
||||
let mut all_names = $crate::vec![ $( stringify!($name).as_ref() ),* ];
|
||||
if !extra {
|
||||
let extra = [ $( stringify!($name_extra).as_ref() ),* ];
|
||||
all.retain(|x| !extra.contains(x));
|
||||
all_names.retain(|x| !extra.contains(x));
|
||||
}
|
||||
all
|
||||
all_names.into_iter().map(|benchmark| {
|
||||
let selected_benchmark = match benchmark {
|
||||
$( stringify!($name) => SelectedBenchmark::$name, )*
|
||||
_ => panic!("all benchmarks should be selectable"),
|
||||
};
|
||||
let components = <
|
||||
SelectedBenchmark as $crate::BenchmarkingSetup<T $(, $instance)?>
|
||||
>::components(&selected_benchmark);
|
||||
|
||||
$crate::BenchmarkMetadata {
|
||||
name: benchmark.as_bytes().to_vec(),
|
||||
components,
|
||||
}
|
||||
}).collect::<$crate::Vec<_>>()
|
||||
}
|
||||
|
||||
fn run_benchmark(
|
||||
extrinsic: &[u8],
|
||||
lowest_range_values: &[u32],
|
||||
highest_range_values: &[u32],
|
||||
steps: (u32, u32),
|
||||
_repeat: (u32, u32),
|
||||
c: &[($crate::BenchmarkParameter, u32)],
|
||||
whitelist: &[$crate::TrackedStorageKey],
|
||||
verify: bool,
|
||||
internal_repeats: u32,
|
||||
) -> Result<$crate::Vec<$crate::BenchmarkResults>, &'static str> {
|
||||
// Map the input to the selected benchmark.
|
||||
let extrinsic = $crate::sp_std::str::from_utf8(extrinsic)
|
||||
@@ -726,7 +780,6 @@ macro_rules! impl_benchmark {
|
||||
$( stringify!($name) => SelectedBenchmark::$name, )*
|
||||
_ => return Err("Could not find extrinsic."),
|
||||
};
|
||||
let mut results: $crate::Vec<$crate::BenchmarkResults> = $crate::Vec::new();
|
||||
|
||||
// Add whitelist to DB including whitelisted caller
|
||||
let mut whitelist = whitelist.to_vec();
|
||||
@@ -737,15 +790,10 @@ macro_rules! impl_benchmark {
|
||||
whitelist.push(whitelisted_caller_key.into());
|
||||
$crate::benchmarking::set_whitelist(whitelist);
|
||||
|
||||
let components = <
|
||||
SelectedBenchmark as $crate::BenchmarkingSetup<T $(, $instance)?>
|
||||
>::components(&selected_benchmark);
|
||||
let mut results: $crate::Vec<$crate::BenchmarkResults> = $crate::Vec::new();
|
||||
|
||||
let do_benchmark = |
|
||||
c: &[($crate::BenchmarkParameter, u32)],
|
||||
results: &mut $crate::Vec<$crate::BenchmarkResults>,
|
||||
verify: bool,
|
||||
| -> Result<(), &'static str> {
|
||||
// Always do at least one internal repeat...
|
||||
for _ in 0 .. internal_repeats.max(1) {
|
||||
// Set up the externalities environment for the setup we want to
|
||||
// benchmark.
|
||||
let closure_to_benchmark = <
|
||||
@@ -764,120 +812,68 @@ macro_rules! impl_benchmark {
|
||||
// Reset the read/write counter so we don't count operations in the setup process.
|
||||
$crate::benchmarking::reset_read_write_count();
|
||||
|
||||
if verify {
|
||||
closure_to_benchmark()?;
|
||||
// Time the extrinsic logic.
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"Start Benchmark: {:?}", c
|
||||
);
|
||||
|
||||
let start_pov = $crate::benchmarking::proof_size();
|
||||
let start_extrinsic = $crate::benchmarking::current_time();
|
||||
|
||||
closure_to_benchmark()?;
|
||||
|
||||
let finish_extrinsic = $crate::benchmarking::current_time();
|
||||
let end_pov = $crate::benchmarking::proof_size();
|
||||
|
||||
// Calculate the diff caused by the benchmark.
|
||||
let elapsed_extrinsic = finish_extrinsic.saturating_sub(start_extrinsic);
|
||||
let diff_pov = match (start_pov, end_pov) {
|
||||
(Some(start), Some(end)) => end.saturating_sub(start),
|
||||
_ => Default::default(),
|
||||
};
|
||||
|
||||
// Commit the changes to get proper write count
|
||||
$crate::benchmarking::commit_db();
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"End Benchmark: {} ns", elapsed_extrinsic
|
||||
);
|
||||
let read_write_count = $crate::benchmarking::read_write_count();
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"Read/Write Count {:?}", read_write_count
|
||||
);
|
||||
|
||||
// Time the storage root recalculation.
|
||||
let start_storage_root = $crate::benchmarking::current_time();
|
||||
$crate::storage_root();
|
||||
let finish_storage_root = $crate::benchmarking::current_time();
|
||||
let elapsed_storage_root = finish_storage_root - start_storage_root;
|
||||
|
||||
let skip_meta = [ $( stringify!($name_skip_meta).as_ref() ),* ];
|
||||
let read_and_written_keys = if (&skip_meta).contains(&extrinsic) {
|
||||
$crate::vec![(b"Skipped Metadata".to_vec(), 0, 0, false)]
|
||||
} else {
|
||||
// Time the extrinsic logic.
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"Start Benchmark: {:?}", c
|
||||
);
|
||||
$crate::benchmarking::get_read_and_written_keys()
|
||||
};
|
||||
|
||||
let start_pov = $crate::benchmarking::proof_size();
|
||||
let start_extrinsic = $crate::benchmarking::current_time();
|
||||
|
||||
closure_to_benchmark()?;
|
||||
|
||||
let finish_extrinsic = $crate::benchmarking::current_time();
|
||||
let end_pov = $crate::benchmarking::proof_size();
|
||||
|
||||
// Calculate the diff caused by the benchmark.
|
||||
let elapsed_extrinsic = finish_extrinsic.saturating_sub(start_extrinsic);
|
||||
let diff_pov = match (start_pov, end_pov) {
|
||||
(Some(start), Some(end)) => end.saturating_sub(start),
|
||||
_ => Default::default(),
|
||||
};
|
||||
|
||||
// Commit the changes to get proper write count
|
||||
$crate::benchmarking::commit_db();
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"End Benchmark: {} ns", elapsed_extrinsic
|
||||
);
|
||||
let read_write_count = $crate::benchmarking::read_write_count();
|
||||
$crate::log::trace!(
|
||||
target: "benchmark",
|
||||
"Read/Write Count {:?}", read_write_count
|
||||
);
|
||||
|
||||
// Time the storage root recalculation.
|
||||
let start_storage_root = $crate::benchmarking::current_time();
|
||||
$crate::storage_root();
|
||||
let finish_storage_root = $crate::benchmarking::current_time();
|
||||
let elapsed_storage_root = finish_storage_root - start_storage_root;
|
||||
|
||||
let read_and_written_keys = $crate::benchmarking::get_read_and_written_keys();
|
||||
|
||||
results.push($crate::BenchmarkResults {
|
||||
components: c.to_vec(),
|
||||
extrinsic_time: elapsed_extrinsic,
|
||||
storage_root_time: elapsed_storage_root,
|
||||
reads: read_write_count.0,
|
||||
repeat_reads: read_write_count.1,
|
||||
writes: read_write_count.2,
|
||||
repeat_writes: read_write_count.3,
|
||||
proof_size: diff_pov,
|
||||
keys: read_and_written_keys,
|
||||
});
|
||||
}
|
||||
results.push($crate::BenchmarkResults {
|
||||
components: c.to_vec(),
|
||||
extrinsic_time: elapsed_extrinsic,
|
||||
storage_root_time: elapsed_storage_root,
|
||||
reads: read_write_count.0,
|
||||
repeat_reads: read_write_count.1,
|
||||
writes: read_write_count.2,
|
||||
repeat_writes: read_write_count.3,
|
||||
proof_size: diff_pov,
|
||||
keys: read_and_written_keys,
|
||||
});
|
||||
|
||||
// Wipe the DB back to the genesis state.
|
||||
$crate::benchmarking::wipe_db();
|
||||
|
||||
Ok(())
|
||||
};
|
||||
|
||||
let (current_step, total_steps) = steps;
|
||||
|
||||
if components.is_empty() {
|
||||
// The CLI could ask to do more steps than is sensible, so we skip those.
|
||||
if current_step == 0 {
|
||||
if verify {
|
||||
// If `--verify` is used, run the benchmark once to verify it would complete.
|
||||
do_benchmark(Default::default(), &mut $crate::Vec::new(), true)?;
|
||||
}
|
||||
do_benchmark(Default::default(), &mut results, false)?;
|
||||
}
|
||||
} else {
|
||||
// Select the component we will be benchmarking. Each component will be benchmarked.
|
||||
for (idx, (name, low, high)) in components.iter().enumerate() {
|
||||
|
||||
let lowest = lowest_range_values.get(idx).cloned().unwrap_or(*low);
|
||||
let highest = highest_range_values.get(idx).cloned().unwrap_or(*high);
|
||||
|
||||
let diff = highest - lowest;
|
||||
|
||||
// Create up to `STEPS` steps for that component between high and low.
|
||||
let step_size = (diff / total_steps).max(1);
|
||||
let num_of_steps = diff / step_size + 1;
|
||||
|
||||
// The CLI could ask to do more steps than is sensible, so we just skip those.
|
||||
if current_step >= num_of_steps {
|
||||
continue;
|
||||
}
|
||||
|
||||
// This is the value we will be testing for component `name`
|
||||
let component_value = lowest + step_size * current_step;
|
||||
|
||||
// Select the max value for all the other components.
|
||||
let c: $crate::Vec<($crate::BenchmarkParameter, u32)> = components.iter()
|
||||
.enumerate()
|
||||
.map(|(idx, (n, _, h))|
|
||||
if n == name {
|
||||
(*n, component_value)
|
||||
} else {
|
||||
(*n, *highest_range_values.get(idx).unwrap_or(h))
|
||||
}
|
||||
)
|
||||
.collect();
|
||||
|
||||
if verify {
|
||||
// If `--verify` is used, run the benchmark once to verify it would complete.
|
||||
do_benchmark(&c, &mut $crate::Vec::new(), true)?;
|
||||
}
|
||||
do_benchmark(&c, &mut results, false)?;
|
||||
}
|
||||
}
|
||||
|
||||
return Ok(results);
|
||||
}
|
||||
}
|
||||
@@ -960,15 +956,14 @@ macro_rules! impl_benchmark_test {
|
||||
if components.is_empty() {
|
||||
execute_benchmark(Default::default())?;
|
||||
} else {
|
||||
for (_, (name, low, high)) in components.iter().enumerate() {
|
||||
for (name, low, high) in components.iter() {
|
||||
// Test only the low and high value, assuming values in the middle
|
||||
// won't break
|
||||
for component_value in $crate::vec![low, high] {
|
||||
// Select the max value for all the other components.
|
||||
let c: $crate::Vec<($crate::BenchmarkParameter, u32)> = components
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(_, (n, _, h))|
|
||||
.map(|(n, _, h)|
|
||||
if n == name {
|
||||
(*n, *component_value)
|
||||
} else {
|
||||
@@ -1206,7 +1201,8 @@ macro_rules! impl_benchmark_test_suite {
|
||||
|
||||
let mut anything_failed = false;
|
||||
println!("failing benchmark tests:");
|
||||
for benchmark_name in $bench_module::<$test>::benchmarks($extra) {
|
||||
for benchmark_metadata in $bench_module::<$test>::benchmarks($extra) {
|
||||
let benchmark_name = &benchmark_metadata.name;
|
||||
match std::panic::catch_unwind(|| {
|
||||
$bench_module::<$test>::test_bench_by_name(benchmark_name)
|
||||
}) {
|
||||
@@ -1233,30 +1229,21 @@ macro_rules! impl_benchmark_test_suite {
|
||||
pub fn show_benchmark_debug_info(
|
||||
instance_string: &[u8],
|
||||
benchmark: &[u8],
|
||||
lowest_range_values: &sp_std::prelude::Vec<u32>,
|
||||
highest_range_values: &sp_std::prelude::Vec<u32>,
|
||||
steps: &(u32, u32),
|
||||
repeat: &(u32, u32),
|
||||
components: &[(BenchmarkParameter, u32)],
|
||||
verify: &bool,
|
||||
error_message: &str,
|
||||
) -> sp_runtime::RuntimeString {
|
||||
sp_runtime::format_runtime_string!(
|
||||
"\n* Pallet: {}\n\
|
||||
* Benchmark: {}\n\
|
||||
* Lowest_range_values: {:?}\n\
|
||||
* Highest_range_values: {:?}\n\
|
||||
* Steps: {:?}\n\
|
||||
* Repeat: {:?}\n\
|
||||
* Components: {:?}\n\
|
||||
* Verify: {:?}\n\
|
||||
* Error message: {}",
|
||||
sp_std::str::from_utf8(instance_string)
|
||||
.expect("it's all just strings ran through the wasm interface. qed"),
|
||||
sp_std::str::from_utf8(benchmark)
|
||||
.expect("it's all just strings ran through the wasm interface. qed"),
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps.1,
|
||||
repeat.1,
|
||||
components,
|
||||
verify,
|
||||
error_message,
|
||||
)
|
||||
@@ -1334,12 +1321,9 @@ macro_rules! add_benchmark {
|
||||
let $crate::BenchmarkConfig {
|
||||
pallet,
|
||||
benchmark,
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps,
|
||||
repeat,
|
||||
selected_components,
|
||||
verify,
|
||||
extra,
|
||||
internal_repeats,
|
||||
} = config;
|
||||
if &pallet[..] == &name_string[..] {
|
||||
$batches.push($crate::BenchmarkBatch {
|
||||
@@ -1348,20 +1332,15 @@ macro_rules! add_benchmark {
|
||||
benchmark: benchmark.clone(),
|
||||
results: $( $location )*::run_benchmark(
|
||||
&benchmark[..],
|
||||
&lowest_range_values[..],
|
||||
&highest_range_values[..],
|
||||
*steps,
|
||||
*repeat,
|
||||
&selected_components[..],
|
||||
whitelist,
|
||||
*verify,
|
||||
*internal_repeats,
|
||||
).map_err(|e| {
|
||||
$crate::show_benchmark_debug_info(
|
||||
instance_string,
|
||||
benchmark,
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps,
|
||||
repeat,
|
||||
selected_components,
|
||||
verify,
|
||||
e,
|
||||
)
|
||||
@@ -1396,10 +1375,7 @@ macro_rules! list_benchmark {
|
||||
( $list:ident, $extra:ident, $name:path, $( $location:tt )* ) => (
|
||||
let pallet_string = stringify!($name).as_bytes();
|
||||
let instance_string = stringify!( $( $location )* ).as_bytes();
|
||||
let benchmarks = $( $location )*::benchmarks($extra)
|
||||
.iter()
|
||||
.map(|b| b.to_vec())
|
||||
.collect::<Vec<_>>();
|
||||
let benchmarks = $( $location )*::benchmarks($extra);
|
||||
let pallet_benchmarks = BenchmarkList {
|
||||
pallet: pallet_string.to_vec(),
|
||||
instance: instance_string.to_vec(),
|
||||
|
||||
@@ -199,6 +199,24 @@ mod benchmarks {
|
||||
variable_components {
|
||||
let b in ( T::LowerBound::get() ) .. T::UpperBound::get();
|
||||
}: dummy (RawOrigin::None, b.into())
|
||||
|
||||
#[extra]
|
||||
extra_benchmark {
|
||||
let b in 1 .. 1000;
|
||||
let caller = account::<T::AccountId>("caller", 0, 0);
|
||||
}: set_value(RawOrigin::Signed(caller), b.into())
|
||||
verify {
|
||||
assert_eq!(Value::get(), Some(b));
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
skip_meta_benchmark {
|
||||
let b in 1 .. 1000;
|
||||
let caller = account::<T::AccountId>("caller", 0, 0);
|
||||
}: set_value(RawOrigin::Signed(caller), b.into())
|
||||
verify {
|
||||
assert_eq!(Value::get(), Some(b));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -76,6 +76,22 @@ pub struct BenchmarkBatch {
|
||||
pub results: Vec<BenchmarkResults>,
|
||||
}
|
||||
|
||||
// TODO: could probably make API cleaner here.
|
||||
/// The results of a single of benchmark, where time and db results are separated.
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Debug)]
|
||||
pub struct BenchmarkBatchSplitResults {
|
||||
/// The pallet containing this benchmark.
|
||||
pub pallet: Vec<u8>,
|
||||
/// The instance of this pallet being benchmarked.
|
||||
pub instance: Vec<u8>,
|
||||
/// The extrinsic (or benchmark name) of this benchmark.
|
||||
pub benchmark: Vec<u8>,
|
||||
/// The extrinsic timing results from this benchmark.
|
||||
pub time_results: Vec<BenchmarkResults>,
|
||||
/// The db tracking results from this benchmark.
|
||||
pub db_results: Vec<BenchmarkResults>,
|
||||
}
|
||||
|
||||
/// Results from running benchmarks on a FRAME pallet.
|
||||
/// Contains duration of the function call in nanoseconds along with the benchmark parameters
|
||||
/// used for that benchmark result.
|
||||
@@ -99,21 +115,12 @@ pub struct BenchmarkConfig {
|
||||
pub pallet: Vec<u8>,
|
||||
/// The encoded name of the benchmark/extrinsic to run.
|
||||
pub benchmark: Vec<u8>,
|
||||
/// An optional manual override to the lowest values used in the `steps` range.
|
||||
pub lowest_range_values: Vec<u32>,
|
||||
/// An optional manual override to the highest values used in the `steps` range.
|
||||
pub highest_range_values: Vec<u32>,
|
||||
/// The number of samples to take across the range of values for components. (current_step,
|
||||
/// total_steps)
|
||||
pub steps: (u32, u32),
|
||||
/// The number times to repeat each benchmark to increase accuracy of results. (current_repeat,
|
||||
/// total_repeat)
|
||||
pub repeat: (u32, u32),
|
||||
/// The selected component values to use when running the benchmark.
|
||||
pub selected_components: Vec<(BenchmarkParameter, u32)>,
|
||||
/// Enable an extra benchmark iteration which runs the verification logic for a benchmark.
|
||||
pub verify: bool,
|
||||
/// Enable benchmarking of "extra" extrinsics, i.e. those that are not directly used in a
|
||||
/// pallet.
|
||||
pub extra: bool,
|
||||
/// Number of times to repeat benchmark within the Wasm environment. (versus in the client)
|
||||
pub internal_repeats: u32,
|
||||
}
|
||||
|
||||
/// A list of benchmarks available for a particular pallet and instance.
|
||||
@@ -123,7 +130,13 @@ pub struct BenchmarkConfig {
|
||||
pub struct BenchmarkList {
|
||||
pub pallet: Vec<u8>,
|
||||
pub instance: Vec<u8>,
|
||||
pub benchmarks: Vec<Vec<u8>>,
|
||||
pub benchmarks: Vec<BenchmarkMetadata>,
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Default, Clone, PartialEq, Debug)]
|
||||
pub struct BenchmarkMetadata {
|
||||
pub name: Vec<u8>,
|
||||
pub components: Vec<(BenchmarkParameter, u32, u32)>,
|
||||
}
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
@@ -228,27 +241,15 @@ pub trait Benchmarking<T> {
|
||||
/// Parameters
|
||||
/// - `extra`: Also return benchmarks marked "extra" which would otherwise not be
|
||||
/// needed for weight calculation.
|
||||
fn benchmarks(extra: bool) -> Vec<&'static [u8]>;
|
||||
fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>;
|
||||
|
||||
/// Run the benchmarks for this pallet.
|
||||
///
|
||||
/// Parameters
|
||||
/// - `name`: The name of extrinsic function or benchmark you want to benchmark encoded as
|
||||
/// bytes.
|
||||
/// - `lowest_range_values`: The lowest number for each range of parameters.
|
||||
/// - `highest_range_values`: The highest number for each range of parameters.
|
||||
/// - `steps`: The number of sample points you want to take across the range of parameters.
|
||||
/// (current_step, total_steps)
|
||||
/// - `repeat`: The total number times to repeat each benchmark to increase accuracy of results.
|
||||
/// (current_repeat, total_repeats)
|
||||
fn run_benchmark(
|
||||
name: &[u8],
|
||||
lowest_range_values: &[u32],
|
||||
highest_range_values: &[u32],
|
||||
steps: (u32, u32),
|
||||
repeat: (u32, u32),
|
||||
selected_components: &[(BenchmarkParameter, u32)],
|
||||
whitelist: &[TrackedStorageKey],
|
||||
verify: bool,
|
||||
internal_repeats: u32,
|
||||
) -> Result<Vec<T>, &'static str>;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_bounties
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -61,62 +61,87 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_bounties using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Treasury BountyCount (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
// Storage: Treasury Bounties (r:0 w:1)
|
||||
fn propose_bounty(d: u32, ) -> Weight {
|
||||
(44_351_000 as Weight)
|
||||
(44_482_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
fn approve_bounty() -> Weight {
|
||||
(12_417_000 as Weight)
|
||||
(11_955_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn propose_curator() -> Weight {
|
||||
(9_692_000 as Weight)
|
||||
(9_771_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unassign_curator() -> Weight {
|
||||
(41_211_000 as Weight)
|
||||
(40_683_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn accept_curator() -> Weight {
|
||||
(37_376_000 as Weight)
|
||||
(36_390_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn award_bounty() -> Weight {
|
||||
(25_525_000 as Weight)
|
||||
(25_187_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:3 w:3)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn claim_bounty() -> Weight {
|
||||
(125_495_000 as Weight)
|
||||
(124_785_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn close_bounty_proposed() -> Weight {
|
||||
(40_464_000 as Weight)
|
||||
(39_483_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn close_bounty_active() -> Weight {
|
||||
(84_042_000 as Weight)
|
||||
(83_453_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn extend_bounty_expiry() -> Weight {
|
||||
(25_114_000 as Weight)
|
||||
(24_151_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn spend_funds(b: u32, ) -> Weight {
|
||||
(351_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((58_724_000 as Weight).saturating_mul(b as Weight))
|
||||
(0 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((58_004_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
@@ -126,62 +151,87 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Treasury BountyCount (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
// Storage: Treasury Bounties (r:0 w:1)
|
||||
fn propose_bounty(d: u32, ) -> Weight {
|
||||
(44_351_000 as Weight)
|
||||
(44_482_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
fn approve_bounty() -> Weight {
|
||||
(12_417_000 as Weight)
|
||||
(11_955_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn propose_curator() -> Weight {
|
||||
(9_692_000 as Weight)
|
||||
(9_771_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unassign_curator() -> Weight {
|
||||
(41_211_000 as Weight)
|
||||
(40_683_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn accept_curator() -> Weight {
|
||||
(37_376_000 as Weight)
|
||||
(36_390_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn award_bounty() -> Weight {
|
||||
(25_525_000 as Weight)
|
||||
(25_187_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:3 w:3)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn claim_bounty() -> Weight {
|
||||
(125_495_000 as Weight)
|
||||
(124_785_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn close_bounty_proposed() -> Weight {
|
||||
(40_464_000 as Weight)
|
||||
(39_483_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Treasury BountyDescriptions (r:0 w:1)
|
||||
fn close_bounty_active() -> Weight {
|
||||
(84_042_000 as Weight)
|
||||
(83_453_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
fn extend_bounty_expiry() -> Weight {
|
||||
(25_114_000 as Weight)
|
||||
(24_151_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
// Storage: Treasury Bounties (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn spend_funds(b: u32, ) -> Weight {
|
||||
(351_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((58_724_000 as Weight).saturating_mul(b as Weight))
|
||||
(0 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((58_004_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(b as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_collective
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-13, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -60,97 +60,132 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_collective using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Instance1Collective Members (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Voting (r:100 w:100)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((14_534_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((160_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((20_189_000 as Weight).saturating_mul(p as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((14_084_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((161_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((19_201_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
(23_177_000 as Weight)
|
||||
(22_748_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((92_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:0)
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
(28_063_000 as Weight)
|
||||
(27_465_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((174_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((178_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalCount (r:1 w:1)
|
||||
// Storage: Instance1Collective Voting (r:0 w:1)
|
||||
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(46_515_000 as Weight)
|
||||
(39_869_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((91_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((486_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((8_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((107_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((406_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
(38_491_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((209_000 as Weight).saturating_mul(m as Weight))
|
||||
(37_387_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((223_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(44_903_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((181_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((350_000 as Weight).saturating_mul(p as Weight))
|
||||
(45_670_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((170_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((358_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(57_416_000 as Weight)
|
||||
(52_529_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((7_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((217_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((206_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((485_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((412_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Prime (r:1 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(50_134_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((189_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((487_000 as Weight).saturating_mul(p as Weight))
|
||||
(50_427_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((170_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((354_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Prime (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(65_901_000 as Weight)
|
||||
(57_031_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((7_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((186_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((208_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((482_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((408_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective Voting (r:0 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
(28_849_000 as Weight)
|
||||
(27_458_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((494_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((402_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -158,97 +193,132 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Instance1Collective Members (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Voting (r:100 w:100)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((14_534_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((160_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((20_189_000 as Weight).saturating_mul(p as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((14_084_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((161_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((19_201_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
(23_177_000 as Weight)
|
||||
(22_748_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((92_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:0)
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
(28_063_000 as Weight)
|
||||
(27_465_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((174_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((178_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalCount (r:1 w:1)
|
||||
// Storage: Instance1Collective Voting (r:0 w:1)
|
||||
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(46_515_000 as Weight)
|
||||
(39_869_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((91_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((486_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((8_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((107_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((406_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
(38_491_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((209_000 as Weight).saturating_mul(m as Weight))
|
||||
(37_387_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((223_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(44_903_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((181_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((350_000 as Weight).saturating_mul(p as Weight))
|
||||
(45_670_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((170_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((358_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(57_416_000 as Weight)
|
||||
(52_529_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((7_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((217_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((206_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((485_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((412_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Prime (r:1 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(50_134_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((189_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((487_000 as Weight).saturating_mul(p as Weight))
|
||||
(50_427_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((170_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((354_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Voting (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:1 w:0)
|
||||
// Storage: Instance1Collective Prime (r:1 w:0)
|
||||
// Storage: Instance1Collective ProposalOf (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(65_901_000 as Weight)
|
||||
(57_031_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((7_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((186_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((208_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((482_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((408_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Collective Proposals (r:1 w:1)
|
||||
// Storage: Instance1Collective Voting (r:0 w:1)
|
||||
// Storage: Instance1Collective ProposalOf (r:0 w:1)
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
(28_849_000 as Weight)
|
||||
(27_458_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((494_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((402_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
|
||||
@@ -288,6 +288,7 @@ benchmarks! {
|
||||
Storage::<T>::process_deletion_queue_batch(Weight::max_value())
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
on_initialize_per_trie_key {
|
||||
let k in 0..1024;
|
||||
let instance = ContractWithStorage::<T>::new(k, T::Schedule::get().limits.payload_len)?;
|
||||
@@ -815,6 +816,7 @@ benchmarks! {
|
||||
}
|
||||
|
||||
// `d`: Number of supplied delta keys
|
||||
#[skip_meta]
|
||||
seal_restore_to_per_delta {
|
||||
let d in 0 .. API_BENCHMARK_BATCHES;
|
||||
let mut tombstone = ContractWithStorage::<T>::new(0, 0)?;
|
||||
@@ -1057,6 +1059,7 @@ benchmarks! {
|
||||
// The contract is a bit more complex because I needs to use different keys in order
|
||||
// to generate unique storage accesses. However, it is still dominated by the storage
|
||||
// accesses.
|
||||
#[skip_meta]
|
||||
seal_set_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
@@ -1122,6 +1125,7 @@ benchmarks! {
|
||||
// Similar to seal_set_storage. However, we store all the keys that we are about to
|
||||
// delete beforehand in order to prevent any optimizations that could occur when
|
||||
// deleting a non existing key.
|
||||
#[skip_meta]
|
||||
seal_clear_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
@@ -1165,6 +1169,7 @@ benchmarks! {
|
||||
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
|
||||
|
||||
// We make sure that all storage accesses are to unique keys.
|
||||
#[skip_meta]
|
||||
seal_get_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
|
||||
@@ -1644,7 +1644,7 @@ fn self_destruct_works() {
|
||||
|
||||
// The call triggers rent collection that reduces the amount of balance
|
||||
// that remains for the beneficiary.
|
||||
let balance_after_rent = 93_078;
|
||||
let balance_after_rent = 93_086;
|
||||
|
||||
pretty_assertions::assert_eq!(
|
||||
System::events(),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_democracy
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -75,164 +75,224 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_democracy using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Democracy PublicPropCount (r:1 w:1)
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:0)
|
||||
// Storage: Democracy DepositOf (r:0 w:1)
|
||||
fn propose() -> Weight {
|
||||
(71_782_000 as Weight)
|
||||
(65_665_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
fn second(s: u32, ) -> Weight {
|
||||
(41_071_000 as Weight)
|
||||
(40_003_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((211_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((180_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_new(r: u32, ) -> Weight {
|
||||
(46_179_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((283_000 as Weight).saturating_mul(r as Weight))
|
||||
(45_465_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((220_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_existing(r: u32, ) -> Weight {
|
||||
(46_169_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((284_000 as Weight).saturating_mul(r as Weight))
|
||||
(45_112_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((222_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy Cancellations (r:1 w:1)
|
||||
fn emergency_cancel() -> Weight {
|
||||
(28_615_000 as Weight)
|
||||
(26_651_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:0 w:1)
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn blacklist(p: u32, ) -> Weight {
|
||||
(80_711_000 as Weight)
|
||||
(77_737_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((590_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((512_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:0)
|
||||
fn external_propose(v: u32, ) -> Weight {
|
||||
(13_197_000 as Weight)
|
||||
(13_126_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((90_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((89_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:0 w:1)
|
||||
fn external_propose_majority() -> Weight {
|
||||
(2_712_000 as Weight)
|
||||
(2_923_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:0 w:1)
|
||||
fn external_propose_default() -> Weight {
|
||||
(2_680_000 as Weight)
|
||||
(2_889_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy ReferendumCount (r:1 w:1)
|
||||
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
fn fast_track() -> Weight {
|
||||
(28_340_000 as Weight)
|
||||
(27_598_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:1)
|
||||
fn veto_external(v: u32, ) -> Weight {
|
||||
(28_894_000 as Weight)
|
||||
(28_416_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((133_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((132_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn cancel_proposal(p: u32, ) -> Weight {
|
||||
(54_339_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((561_000 as Weight).saturating_mul(p as Weight))
|
||||
(52_836_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((478_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
fn cancel_referendum() -> Weight {
|
||||
(17_183_000 as Weight)
|
||||
(16_891_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_queued(r: u32, ) -> Weight {
|
||||
(30_500_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_730_000 as Weight).saturating_mul(r as Weight))
|
||||
(30_504_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_480_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy LastTabledWasExternal (r:1 w:0)
|
||||
// Storage: Democracy NextExternal (r:1 w:0)
|
||||
// Storage: Democracy PublicProps (r:1 w:0)
|
||||
// Storage: Democracy LowestUnbaked (r:1 w:0)
|
||||
// Storage: Democracy ReferendumCount (r:1 w:0)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
|
||||
fn on_initialize_base(r: u32, ) -> Weight {
|
||||
(7_788_000 as Weight)
|
||||
(6_259_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((5_422_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((5_032_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:3 w:3)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn delegate(r: u32, ) -> Weight {
|
||||
(55_676_000 as Weight)
|
||||
(51_719_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((7_553_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((7_210_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:2 w:2)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
fn undelegate(r: u32, ) -> Weight {
|
||||
(23_908_000 as Weight)
|
||||
(23_203_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((7_551_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((7_206_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:0 w:1)
|
||||
fn clear_public_proposals() -> Weight {
|
||||
(3_023_000 as Weight)
|
||||
(3_127_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
fn note_preimage(b: u32, ) -> Weight {
|
||||
(44_069_000 as Weight)
|
||||
(44_130_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
fn note_imminent_preimage(b: u32, ) -> Weight {
|
||||
(28_457_000 as Weight)
|
||||
(28_756_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:0)
|
||||
fn reap_preimage(b: u32, ) -> Weight {
|
||||
(39_646_000 as Weight)
|
||||
(39_922_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlock_remove(r: u32, ) -> Weight {
|
||||
(39_499_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((148_000 as Weight).saturating_mul(r as Weight))
|
||||
(38_621_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((110_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlock_set(r: u32, ) -> Weight {
|
||||
(37_340_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((266_000 as Weight).saturating_mul(r as Weight))
|
||||
(36_631_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
fn remove_vote(r: u32, ) -> Weight {
|
||||
(20_397_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((259_000 as Weight).saturating_mul(r as Weight))
|
||||
(21_025_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((195_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
fn remove_other_vote(r: u32, ) -> Weight {
|
||||
(20_425_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((156_000 as Weight).saturating_mul(r as Weight))
|
||||
(20_628_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -240,164 +300,224 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Democracy PublicPropCount (r:1 w:1)
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:0)
|
||||
// Storage: Democracy DepositOf (r:0 w:1)
|
||||
fn propose() -> Weight {
|
||||
(71_782_000 as Weight)
|
||||
(65_665_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
fn second(s: u32, ) -> Weight {
|
||||
(41_071_000 as Weight)
|
||||
(40_003_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((211_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((180_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_new(r: u32, ) -> Weight {
|
||||
(46_179_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((283_000 as Weight).saturating_mul(r as Weight))
|
||||
(45_465_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((220_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_existing(r: u32, ) -> Weight {
|
||||
(46_169_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((284_000 as Weight).saturating_mul(r as Weight))
|
||||
(45_112_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((222_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy Cancellations (r:1 w:1)
|
||||
fn emergency_cancel() -> Weight {
|
||||
(28_615_000 as Weight)
|
||||
(26_651_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:0 w:1)
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn blacklist(p: u32, ) -> Weight {
|
||||
(80_711_000 as Weight)
|
||||
(77_737_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((590_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((512_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:0)
|
||||
fn external_propose(v: u32, ) -> Weight {
|
||||
(13_197_000 as Weight)
|
||||
(13_126_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((90_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((89_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:0 w:1)
|
||||
fn external_propose_majority() -> Weight {
|
||||
(2_712_000 as Weight)
|
||||
(2_923_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:0 w:1)
|
||||
fn external_propose_default() -> Weight {
|
||||
(2_680_000 as Weight)
|
||||
(2_889_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy ReferendumCount (r:1 w:1)
|
||||
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
fn fast_track() -> Weight {
|
||||
(28_340_000 as Weight)
|
||||
(27_598_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy NextExternal (r:1 w:1)
|
||||
// Storage: Democracy Blacklist (r:1 w:1)
|
||||
fn veto_external(v: u32, ) -> Weight {
|
||||
(28_894_000 as Weight)
|
||||
(28_416_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((133_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((132_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:1 w:1)
|
||||
// Storage: Democracy DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn cancel_proposal(p: u32, ) -> Weight {
|
||||
(54_339_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((561_000 as Weight).saturating_mul(p as Weight))
|
||||
(52_836_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((478_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
fn cancel_referendum() -> Weight {
|
||||
(17_183_000 as Weight)
|
||||
(16_891_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_queued(r: u32, ) -> Weight {
|
||||
(30_500_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_730_000 as Weight).saturating_mul(r as Weight))
|
||||
(30_504_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_480_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy LastTabledWasExternal (r:1 w:0)
|
||||
// Storage: Democracy NextExternal (r:1 w:0)
|
||||
// Storage: Democracy PublicProps (r:1 w:0)
|
||||
// Storage: Democracy LowestUnbaked (r:1 w:0)
|
||||
// Storage: Democracy ReferendumCount (r:1 w:0)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
|
||||
fn on_initialize_base(r: u32, ) -> Weight {
|
||||
(7_788_000 as Weight)
|
||||
(6_259_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((5_422_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((5_032_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:3 w:3)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn delegate(r: u32, ) -> Weight {
|
||||
(55_676_000 as Weight)
|
||||
(51_719_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((7_553_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((7_210_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:2 w:2)
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
fn undelegate(r: u32, ) -> Weight {
|
||||
(23_908_000 as Weight)
|
||||
(23_203_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((7_551_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((7_206_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
|
||||
}
|
||||
// Storage: Democracy PublicProps (r:0 w:1)
|
||||
fn clear_public_proposals() -> Weight {
|
||||
(3_023_000 as Weight)
|
||||
(3_127_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
fn note_preimage(b: u32, ) -> Weight {
|
||||
(44_069_000 as Weight)
|
||||
(44_130_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
fn note_imminent_preimage(b: u32, ) -> Weight {
|
||||
(28_457_000 as Weight)
|
||||
(28_756_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy Preimages (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:0)
|
||||
fn reap_preimage(b: u32, ) -> Weight {
|
||||
(39_646_000 as Weight)
|
||||
(39_922_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlock_remove(r: u32, ) -> Weight {
|
||||
(39_499_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((148_000 as Weight).saturating_mul(r as Weight))
|
||||
(38_621_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((110_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlock_set(r: u32, ) -> Weight {
|
||||
(37_340_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((266_000 as Weight).saturating_mul(r as Weight))
|
||||
(36_631_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
fn remove_vote(r: u32, ) -> Weight {
|
||||
(20_397_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((259_000 as Weight).saturating_mul(r as Weight))
|
||||
(21_025_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((195_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
// Storage: Democracy VotingOf (r:1 w:1)
|
||||
fn remove_other_vote(r: u32, ) -> Weight {
|
||||
(20_425_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((156_000 as Weight).saturating_mul(r as Weight))
|
||||
(20_628_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_election_provider_multi_phase
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-07-07, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -48,9 +48,9 @@ pub trait WeightInfo {
|
||||
fn on_initialize_nothing() -> Weight;
|
||||
fn on_initialize_open_signed() -> Weight;
|
||||
fn on_initialize_open_unsigned_with_snapshot() -> Weight;
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight;
|
||||
fn finalize_signed_phase_accept_solution() -> Weight;
|
||||
fn finalize_signed_phase_reject_solution() -> Weight;
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight;
|
||||
fn elect_queued(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
|
||||
fn submit(c: u32, ) -> Weight;
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
|
||||
@@ -60,150 +60,286 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_election_provider_multi_phase using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking CurrentPlannedSession (r:1 w:0)
|
||||
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
// Storage: Babe EpochIndex (r:1 w:0)
|
||||
// Storage: Babe GenesisSlot (r:1 w:0)
|
||||
// Storage: Babe CurrentSlot (r:1 w:0)
|
||||
// Storage: Staking ForceEra (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(33_170_000 as Weight)
|
||||
(22_589_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(113_680_000 as Weight)
|
||||
(107_551_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned_with_snapshot() -> Weight {
|
||||
(113_619_000 as Weight)
|
||||
(96_899_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(18_549_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1)
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(60_184_000 as Weight)
|
||||
(48_349_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(40_151_000 as Weight)
|
||||
(32_014_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(23_833_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn elect_queued(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(51_573_000 as Weight)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn elect_queued(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((9_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((43_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((189_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_957_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((588_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((1_667_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((129_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1)
|
||||
fn submit(c: u32, ) -> Weight {
|
||||
(77_469_000 as Weight)
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
(72_163_000 as Weight)
|
||||
// Standard Error: 30_000
|
||||
.saturating_add((254_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((3_667_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 29_000
|
||||
.saturating_add((497_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((11_228_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 73_000
|
||||
.saturating_add((4_432_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((3_512_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((49_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((10_295_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 59_000
|
||||
.saturating_add((6_008_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((3_613_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((9_677_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 58_000
|
||||
.saturating_add((4_178_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((3_508_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 40_000
|
||||
.saturating_add((302_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((8_658_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 100_000
|
||||
.saturating_add((4_816_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking CurrentPlannedSession (r:1 w:0)
|
||||
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
// Storage: Babe EpochIndex (r:1 w:0)
|
||||
// Storage: Babe GenesisSlot (r:1 w:0)
|
||||
// Storage: Babe CurrentSlot (r:1 w:0)
|
||||
// Storage: Staking ForceEra (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(33_564_000 as Weight)
|
||||
(22_589_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(114_561_000 as Weight)
|
||||
(107_551_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned_with_snapshot() -> Weight {
|
||||
(114_070_000 as Weight)
|
||||
(96_899_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(18_549_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1)
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(59_765_000 as Weight)
|
||||
(48_349_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(39_894_000 as Weight)
|
||||
(32_014_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(23_591_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn elect_queued(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn elect_queued(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((19_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_959_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((392_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((43_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((189_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_667_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((129_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1)
|
||||
fn submit(c: u32, ) -> Weight {
|
||||
(77_616_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((213_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
(72_163_000 as Weight)
|
||||
// Standard Error: 30_000
|
||||
.saturating_add((254_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((3_701_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 42_000
|
||||
.saturating_add((75_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((11_268_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 107_000
|
||||
.saturating_add((5_019_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((3_512_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((49_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((10_295_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 59_000
|
||||
.saturating_add((6_008_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn feasibility_check(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((3_632_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((9_664_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 95_000
|
||||
.saturating_add((4_264_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((3_508_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 40_000
|
||||
.saturating_add((302_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((8_658_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 100_000
|
||||
.saturating_add((4_816_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_elections_phragmen
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -62,81 +62,130 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_elections_phragmen using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
(43_911_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((324_000 as Weight).saturating_mul(v as Weight))
|
||||
(42_509_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
(68_236_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((359_000 as Weight).saturating_mul(v as Weight))
|
||||
(65_311_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((419_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
(68_162_000 as Weight)
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((350_000 as Weight).saturating_mul(v as Weight))
|
||||
(65_444_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((376_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn remove_voter() -> Weight {
|
||||
(63_005_000 as Weight)
|
||||
(61_585_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
(58_498_000 as Weight)
|
||||
(53_333_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((305_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((267_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
(52_062_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((173_000 as Weight).saturating_mul(c as Weight))
|
||||
(49_128_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((144_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
(73_234_000 as Weight)
|
||||
(70_685_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
(51_689_000 as Weight)
|
||||
(49_766_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
(79_906_000 as Weight)
|
||||
(76_153_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn remove_member_wrong_refund() -> Weight {
|
||||
(6_877_000 as Weight)
|
||||
(6_697_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:251 w:250)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Balances Locks (r:250 w:250)
|
||||
// Storage: System Account (r:250 w:250)
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 39_000
|
||||
.saturating_add((112_381_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 60_000
|
||||
.saturating_add((107_467_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Voting (r:502 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Elections ElectionRounds (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_789_000
|
||||
.saturating_add((42_600_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 744_000
|
||||
.saturating_add((60_743_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 50_000
|
||||
.saturating_add((3_837_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 1_846_000
|
||||
.saturating_add((39_843_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 768_000
|
||||
.saturating_add((60_623_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 52_000
|
||||
.saturating_add((3_884_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
|
||||
@@ -145,81 +194,130 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
(43_911_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((324_000 as Weight).saturating_mul(v as Weight))
|
||||
(42_509_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
(68_236_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((359_000 as Weight).saturating_mul(v as Weight))
|
||||
(65_311_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((419_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
(68_162_000 as Weight)
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((350_000 as Weight).saturating_mul(v as Weight))
|
||||
(65_444_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((376_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn remove_voter() -> Weight {
|
||||
(63_005_000 as Weight)
|
||||
(61_585_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
(58_498_000 as Weight)
|
||||
(53_333_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((305_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((267_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
(52_062_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((173_000 as Weight).saturating_mul(c as Weight))
|
||||
(49_128_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((144_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
(73_234_000 as Weight)
|
||||
(70_685_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
(51_689_000 as Weight)
|
||||
(49_766_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
(79_906_000 as Weight)
|
||||
(76_153_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn remove_member_wrong_refund() -> Weight {
|
||||
(6_877_000 as Weight)
|
||||
(6_697_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:251 w:250)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
// Storage: Elections Candidates (r:1 w:0)
|
||||
// Storage: Balances Locks (r:250 w:250)
|
||||
// Storage: System Account (r:250 w:250)
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 39_000
|
||||
.saturating_add((112_381_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 60_000
|
||||
.saturating_add((107_467_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Voting (r:502 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Elections ElectionRounds (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_789_000
|
||||
.saturating_add((42_600_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 744_000
|
||||
.saturating_add((60_743_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 50_000
|
||||
.saturating_add((3_837_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 1_846_000
|
||||
.saturating_add((39_843_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 768_000
|
||||
.saturating_add((60_623_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 52_000
|
||||
.saturating_add((3_884_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_gilt
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -58,51 +58,69 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_gilt using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn place_bid(l: u32, ) -> Weight {
|
||||
(60_401_000 as Weight)
|
||||
(59_219_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((146_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add((156_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn place_bid_max() -> Weight {
|
||||
(178_653_000 as Weight)
|
||||
(184_943_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn retract_bid(l: u32, ) -> Weight {
|
||||
(61_026_000 as Weight)
|
||||
(59_352_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((119_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add((129_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn set_target() -> Weight {
|
||||
(5_756_000 as Weight)
|
||||
(5_444_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Gilt Active (r:1 w:1)
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
(72_668_000 as Weight)
|
||||
(71_399_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:0)
|
||||
fn pursue_target_noop() -> Weight {
|
||||
(3_449_000 as Weight)
|
||||
(3_044_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
fn pursue_target_per_item(b: u32, ) -> Weight {
|
||||
(58_182_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((10_005_000 as Weight).saturating_mul(b as Weight))
|
||||
(54_478_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((10_150_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
fn pursue_target_per_queue(q: u32, ) -> Weight {
|
||||
(21_740_000 as Weight)
|
||||
(20_099_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((16_849_000 as Weight).saturating_mul(q as Weight))
|
||||
.saturating_add((16_603_000 as Weight).saturating_mul(q as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(q as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
@@ -112,51 +130,69 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn place_bid(l: u32, ) -> Weight {
|
||||
(60_401_000 as Weight)
|
||||
(59_219_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((146_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add((156_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn place_bid_max() -> Weight {
|
||||
(178_653_000 as Weight)
|
||||
(184_943_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn retract_bid(l: u32, ) -> Weight {
|
||||
(61_026_000 as Weight)
|
||||
(59_352_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((119_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add((129_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn set_target() -> Weight {
|
||||
(5_756_000 as Weight)
|
||||
(5_444_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Gilt Active (r:1 w:1)
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
(72_668_000 as Weight)
|
||||
(71_399_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:0)
|
||||
fn pursue_target_noop() -> Weight {
|
||||
(3_449_000 as Weight)
|
||||
(3_044_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
fn pursue_target_per_item(b: u32, ) -> Weight {
|
||||
(58_182_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((10_005_000 as Weight).saturating_mul(b as Weight))
|
||||
(54_478_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((10_150_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
fn pursue_target_per_queue(q: u32, ) -> Weight {
|
||||
(21_740_000 as Weight)
|
||||
(20_099_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((16_849_000 as Weight).saturating_mul(q as Weight))
|
||||
.saturating_add((16_603_000 as Weight).saturating_mul(q as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(q as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_identity
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -66,136 +66,167 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_identity using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn add_registrar(r: u32, ) -> Weight {
|
||||
(21_825_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((288_000 as Weight).saturating_mul(r as Weight))
|
||||
(22_152_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((339_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn set_identity(r: u32, x: u32, ) -> Weight {
|
||||
(53_354_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((274_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((939_000 as Weight).saturating_mul(x as Weight))
|
||||
(53_017_000 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((279_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_081_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
fn set_subs_new(s: u32, ) -> Weight {
|
||||
(42_017_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((6_457_000 as Weight).saturating_mul(s as Weight))
|
||||
(44_693_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((6_631_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:1)
|
||||
fn set_subs_old(p: u32, ) -> Weight {
|
||||
(41_605_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_157_000 as Weight).saturating_mul(p as Weight))
|
||||
(42_017_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_193_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:100)
|
||||
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
(51_811_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((202_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_157_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((618_000 as Weight).saturating_mul(x as Weight))
|
||||
(50_989_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((258_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_184_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((579_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:0)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn request_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(54_657_000 as Weight)
|
||||
(55_562_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((381_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((317_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_153_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add((1_137_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn cancel_request(r: u32, x: u32, ) -> Weight {
|
||||
(50_895_000 as Weight)
|
||||
(51_744_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((267_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((192_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_131_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
(9_472_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((321_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
(9_705_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((312_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
(9_537_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((318_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:0)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn provide_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(36_298_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((284_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_141_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
(8_036_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
(9_001_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((288_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
(8_039_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn provide_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(35_746_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((346_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_164_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
(65_304_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((149_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_118_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((6_000 as Weight).saturating_mul(x as Weight))
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:100)
|
||||
fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight {
|
||||
(63_238_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((246_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_184_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn add_sub(s: u32, ) -> Weight {
|
||||
(55_491_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((220_000 as Weight).saturating_mul(s as Weight))
|
||||
(57_394_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((208_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
fn rename_sub(s: u32, ) -> Weight {
|
||||
(17_564_000 as Weight)
|
||||
(18_274_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((84_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((52_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn remove_sub(s: u32, ) -> Weight {
|
||||
(56_535_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((209_000 as Weight).saturating_mul(s as Weight))
|
||||
(58_184_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((195_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn quit_sub(s: u32, ) -> Weight {
|
||||
(35_369_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((200_000 as Weight).saturating_mul(s as Weight))
|
||||
(36_304_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((191_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -203,136 +234,167 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn add_registrar(r: u32, ) -> Weight {
|
||||
(21_825_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((288_000 as Weight).saturating_mul(r as Weight))
|
||||
(22_152_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((339_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn set_identity(r: u32, x: u32, ) -> Weight {
|
||||
(53_354_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((274_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((939_000 as Weight).saturating_mul(x as Weight))
|
||||
(53_017_000 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((279_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_081_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
fn set_subs_new(s: u32, ) -> Weight {
|
||||
(42_017_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((6_457_000 as Weight).saturating_mul(s as Weight))
|
||||
(44_693_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((6_631_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:1)
|
||||
fn set_subs_old(p: u32, ) -> Weight {
|
||||
(41_605_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_157_000 as Weight).saturating_mul(p as Weight))
|
||||
(42_017_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_193_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:100)
|
||||
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
(51_811_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((202_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_157_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((618_000 as Weight).saturating_mul(x as Weight))
|
||||
(50_989_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((258_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_184_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((579_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:0)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn request_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(54_657_000 as Weight)
|
||||
(55_562_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((381_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((317_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_153_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add((1_137_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn cancel_request(r: u32, x: u32, ) -> Weight {
|
||||
(50_895_000 as Weight)
|
||||
(51_744_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((267_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add((192_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_131_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
(9_472_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((321_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
(9_705_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((312_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:1)
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
(9_537_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((318_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity Registrars (r:1 w:0)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
fn provide_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(36_298_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((284_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_141_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
(8_036_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
(9_001_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((288_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
(8_039_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn provide_judgement(r: u32, x: u32, ) -> Weight {
|
||||
(35_746_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((346_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_164_000 as Weight).saturating_mul(x as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
(65_304_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((149_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_118_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((6_000 as Weight).saturating_mul(x as Weight))
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
// Storage: Identity IdentityOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Identity SuperOf (r:0 w:100)
|
||||
fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight {
|
||||
(63_238_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((246_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_184_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn add_sub(s: u32, ) -> Weight {
|
||||
(55_491_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((220_000 as Weight).saturating_mul(s as Weight))
|
||||
(57_394_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((208_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
fn rename_sub(s: u32, ) -> Weight {
|
||||
(17_564_000 as Weight)
|
||||
(18_274_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((84_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((52_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Identity IdentityOf (r:1 w:0)
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn remove_sub(s: u32, ) -> Weight {
|
||||
(56_535_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((209_000 as Weight).saturating_mul(s as Weight))
|
||||
(58_184_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((195_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Identity SuperOf (r:1 w:1)
|
||||
// Storage: Identity SubsOf (r:1 w:1)
|
||||
fn quit_sub(s: u32, ) -> Weight {
|
||||
(35_369_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((200_000 as Weight).saturating_mul(s as Weight))
|
||||
(36_304_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((191_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_im_online
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -51,12 +51,17 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_im_online using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Session Validators (r:1 w:0)
|
||||
// Storage: Session CurrentIndex (r:1 w:0)
|
||||
// Storage: ImOnline ReceivedHeartbeats (r:1 w:1)
|
||||
// Storage: ImOnline AuthoredBlocks (r:1 w:0)
|
||||
// Storage: ImOnline Keys (r:1 w:0)
|
||||
fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight {
|
||||
(97_166_000 as Weight)
|
||||
(93_400_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((153_000 as Weight).saturating_mul(k as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((328_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add((144_000 as Weight).saturating_mul(k as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((335_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -64,12 +69,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Session Validators (r:1 w:0)
|
||||
// Storage: Session CurrentIndex (r:1 w:0)
|
||||
// Storage: ImOnline ReceivedHeartbeats (r:1 w:1)
|
||||
// Storage: ImOnline AuthoredBlocks (r:1 w:0)
|
||||
// Storage: ImOnline Keys (r:1 w:0)
|
||||
fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight {
|
||||
(97_166_000 as Weight)
|
||||
(93_400_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((153_000 as Weight).saturating_mul(k as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((328_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add((144_000 as Weight).saturating_mul(k as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((335_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_indices
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -55,28 +55,35 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_indices using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn claim() -> Weight {
|
||||
(40_622_000 as Weight)
|
||||
(38_814_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(49_166_000 as Weight)
|
||||
(47_274_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn free() -> Weight {
|
||||
(40_802_000 as Weight)
|
||||
(39_692_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_transfer() -> Weight {
|
||||
(41_423_000 as Weight)
|
||||
(40_250_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn freeze() -> Weight {
|
||||
(38_476_000 as Weight)
|
||||
(37_358_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -84,28 +91,35 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn claim() -> Weight {
|
||||
(40_622_000 as Weight)
|
||||
(38_814_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(49_166_000 as Weight)
|
||||
(47_274_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn free() -> Weight {
|
||||
(40_802_000 as Weight)
|
||||
(39_692_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_transfer() -> Weight {
|
||||
(41_423_000 as Weight)
|
||||
(40_250_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Indices Accounts (r:1 w:1)
|
||||
fn freeze() -> Weight {
|
||||
(38_476_000 as Weight)
|
||||
(37_358_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_lottery
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-14, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -56,34 +56,57 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_lottery using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Lottery Lottery (r:1 w:0)
|
||||
// Storage: Lottery CallIndices (r:1 w:0)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Participants (r:1 w:1)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:0 w:1)
|
||||
fn buy_ticket() -> Weight {
|
||||
(74_856_000 as Weight)
|
||||
(70_034_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Lottery CallIndices (r:0 w:1)
|
||||
fn set_calls(n: u32, ) -> Weight {
|
||||
(15_549_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(n as Weight))
|
||||
(15_243_000 as Weight)
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((312_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn start_lottery() -> Weight {
|
||||
(58_904_000 as Weight)
|
||||
(57_312_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
fn stop_repeat() -> Weight {
|
||||
(7_714_000 as Weight)
|
||||
(6_964_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:1 w:0)
|
||||
fn on_initialize_end() -> Weight {
|
||||
(117_420_000 as Weight)
|
||||
(110_470_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:1 w:0)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:1)
|
||||
fn on_initialize_repeat() -> Weight {
|
||||
(123_035_000 as Weight)
|
||||
(114_794_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
@@ -91,34 +114,57 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Lottery Lottery (r:1 w:0)
|
||||
// Storage: Lottery CallIndices (r:1 w:0)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Participants (r:1 w:1)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:0 w:1)
|
||||
fn buy_ticket() -> Weight {
|
||||
(74_856_000 as Weight)
|
||||
(70_034_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Lottery CallIndices (r:0 w:1)
|
||||
fn set_calls(n: u32, ) -> Weight {
|
||||
(15_549_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(n as Weight))
|
||||
(15_243_000 as Weight)
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((312_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn start_lottery() -> Weight {
|
||||
(58_904_000 as Weight)
|
||||
(57_312_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
fn stop_repeat() -> Weight {
|
||||
(7_714_000 as Weight)
|
||||
(6_964_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:1 w:0)
|
||||
fn on_initialize_end() -> Weight {
|
||||
(117_420_000 as Weight)
|
||||
(110_470_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
|
||||
// Storage: Lottery Lottery (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Lottery TicketsCount (r:1 w:1)
|
||||
// Storage: Lottery Tickets (r:1 w:0)
|
||||
// Storage: Lottery LotteryIndex (r:1 w:1)
|
||||
fn on_initialize_repeat() -> Weight {
|
||||
(123_035_000 as Weight)
|
||||
(114_794_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_membership
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -57,104 +57,162 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_membership using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(24_309_000 as Weight)
|
||||
(23_668_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((147_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((142_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(29_722_000 as Weight)
|
||||
(29_149_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((119_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((111_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(30_239_000 as Weight)
|
||||
(29_289_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((132_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((126_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(31_302_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((289_000 as Weight).saturating_mul(m as Weight))
|
||||
(30_178_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:1)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(31_967_000 as Weight)
|
||||
(31_049_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((130_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((121_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(8_083_000 as Weight)
|
||||
(8_006_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((91_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(3_360_000 as Weight)
|
||||
(3_452_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(24_309_000 as Weight)
|
||||
(23_668_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((147_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((142_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(29_722_000 as Weight)
|
||||
(29_149_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((119_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((111_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(30_239_000 as Weight)
|
||||
(29_289_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((132_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((126_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(31_302_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((289_000 as Weight).saturating_mul(m as Weight))
|
||||
(30_178_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:1)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(31_967_000 as Weight)
|
||||
(31_049_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((130_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((121_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(8_083_000 as Weight)
|
||||
(8_006_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((91_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(3_360_000 as Weight)
|
||||
(3_452_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_multisig
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -60,79 +60,101 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_multisig using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn as_multi_threshold_1(_z: u32, ) -> Weight {
|
||||
(14_411_000 as Weight)
|
||||
}
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
(54_200_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((127_000 as Weight).saturating_mul(s as Weight))
|
||||
fn as_multi_threshold_1(z: u32, ) -> Weight {
|
||||
(19_405_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
(54_364_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((163_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
|
||||
(60_502_000 as Weight)
|
||||
(59_545_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((128_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((168_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
|
||||
(32_075_000 as Weight)
|
||||
(32_721_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((132_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((176_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
|
||||
(57_742_000 as Weight)
|
||||
(56_596_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((183_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((141_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
|
||||
(73_503_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((246_000 as Weight).saturating_mul(s as Weight))
|
||||
(72_391_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((268_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn approve_as_multi_create(s: u32, ) -> Weight {
|
||||
(53_659_000 as Weight)
|
||||
(52_543_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((164_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:0)
|
||||
fn approve_as_multi_approve(s: u32, ) -> Weight {
|
||||
(31_353_000 as Weight)
|
||||
(30_764_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((136_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((180_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn approve_as_multi_complete(s: u32, ) -> Weight {
|
||||
(125_011_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((247_000 as Weight).saturating_mul(s as Weight))
|
||||
(113_631_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((283_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
fn cancel_as_multi(s: u32, ) -> Weight {
|
||||
(92_318_000 as Weight)
|
||||
(86_310_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((128_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((166_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -140,79 +162,101 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
fn as_multi_threshold_1(_z: u32, ) -> Weight {
|
||||
(14_411_000 as Weight)
|
||||
}
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
(54_200_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((127_000 as Weight).saturating_mul(s as Weight))
|
||||
fn as_multi_threshold_1(z: u32, ) -> Weight {
|
||||
(19_405_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
(54_364_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((163_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
|
||||
(60_502_000 as Weight)
|
||||
(59_545_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((128_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((168_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
|
||||
(32_075_000 as Weight)
|
||||
(32_721_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((132_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((176_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
|
||||
(57_742_000 as Weight)
|
||||
(56_596_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((183_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((141_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
|
||||
(73_503_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((246_000 as Weight).saturating_mul(s as Weight))
|
||||
(72_391_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((268_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((4_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
fn approve_as_multi_create(s: u32, ) -> Weight {
|
||||
(53_659_000 as Weight)
|
||||
(52_543_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((164_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:0)
|
||||
fn approve_as_multi_approve(s: u32, ) -> Weight {
|
||||
(31_353_000 as Weight)
|
||||
(30_764_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((136_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((180_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn approve_as_multi_complete(s: u32, ) -> Weight {
|
||||
(125_011_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((247_000 as Weight).saturating_mul(s as Weight))
|
||||
(113_631_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((283_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Multisig Multisigs (r:1 w:1)
|
||||
// Storage: Multisig Calls (r:1 w:1)
|
||||
fn cancel_as_multi(s: u32, ) -> Weight {
|
||||
(92_318_000 as Weight)
|
||||
(86_310_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((128_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((166_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_proxy
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -60,80 +60,93 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_proxy using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
fn proxy(p: u32, ) -> Weight {
|
||||
(22_645_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((162_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
(53_259_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((543_000 as Weight).saturating_mul(a as Weight))
|
||||
(23_213_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((153_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
(53_286_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((549_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((138_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn remove_announcement(a: u32, p: u32, ) -> Weight {
|
||||
(37_983_000 as Weight)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn remove_announcement(a: u32, _p: u32, ) -> Weight {
|
||||
(36_864_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((545_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((4_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((550_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn reject_announcement(a: u32, p: u32, ) -> Weight {
|
||||
(37_922_000 as Weight)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn reject_announcement(a: u32, _p: u32, ) -> Weight {
|
||||
(36_755_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((541_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((6_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((550_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn announce(a: u32, p: u32, ) -> Weight {
|
||||
(51_355_000 as Weight)
|
||||
(50_765_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((534_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add((547_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((148_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((141_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn add_proxy(p: u32, ) -> Weight {
|
||||
(35_798_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((228_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
(35_554_000 as Weight)
|
||||
(35_556_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((250_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((211_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
(35_284_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((229_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn remove_proxies(p: u32, ) -> Weight {
|
||||
(33_911_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((165_000 as Weight).saturating_mul(p as Weight))
|
||||
(34_449_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((146_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn anonymous(p: u32, ) -> Weight {
|
||||
(48_695_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((53_000 as Weight).saturating_mul(p as Weight))
|
||||
(49_149_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((15_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn kill_anonymous(p: u32, ) -> Weight {
|
||||
(35_904_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((159_000 as Weight).saturating_mul(p as Weight))
|
||||
(36_399_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((152_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -141,80 +154,93 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
fn proxy(p: u32, ) -> Weight {
|
||||
(22_645_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((162_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
(53_259_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((543_000 as Weight).saturating_mul(a as Weight))
|
||||
(23_213_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((153_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
(53_286_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((549_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((138_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn remove_announcement(a: u32, p: u32, ) -> Weight {
|
||||
(37_983_000 as Weight)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn remove_announcement(a: u32, _p: u32, ) -> Weight {
|
||||
(36_864_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((545_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((4_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((550_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn reject_announcement(a: u32, p: u32, ) -> Weight {
|
||||
(37_922_000 as Weight)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn reject_announcement(a: u32, _p: u32, ) -> Weight {
|
||||
(36_755_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((541_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((6_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((550_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:0)
|
||||
// Storage: Proxy Announcements (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn announce(a: u32, p: u32, ) -> Weight {
|
||||
(51_355_000 as Weight)
|
||||
(50_765_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((534_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add((547_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((148_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((141_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn add_proxy(p: u32, ) -> Weight {
|
||||
(35_798_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((228_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
(35_554_000 as Weight)
|
||||
(35_556_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((250_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((211_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
(35_284_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((229_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn remove_proxies(p: u32, ) -> Weight {
|
||||
(33_911_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((165_000 as Weight).saturating_mul(p as Weight))
|
||||
(34_449_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((146_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn anonymous(p: u32, ) -> Weight {
|
||||
(48_695_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((53_000 as Weight).saturating_mul(p as Weight))
|
||||
(49_149_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((15_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Proxy Proxies (r:1 w:1)
|
||||
fn kill_anonymous(p: u32, ) -> Weight {
|
||||
(35_904_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((159_000 as Weight).saturating_mul(p as Weight))
|
||||
(36_399_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((152_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_scheduler
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -54,31 +54,38 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_scheduler using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
(24_811_000 as Weight)
|
||||
(24_730_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((116_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((77_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
(23_851_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((1_439_000 as Weight).saturating_mul(s as Weight))
|
||||
(23_272_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_261_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
(31_096_000 as Weight)
|
||||
(30_971_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((141_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((96_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
(26_715_000 as Weight)
|
||||
(25_778_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_455_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((1_270_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -86,31 +93,38 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
(24_811_000 as Weight)
|
||||
(24_730_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((116_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((77_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
(23_851_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((1_439_000 as Weight).saturating_mul(s as Weight))
|
||||
(23_272_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_261_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
(31_096_000 as Weight)
|
||||
(30_971_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((141_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((96_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
(26_715_000 as Weight)
|
||||
(25_778_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_455_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((1_270_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_session
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -52,13 +52,19 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_session using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Session NextKeys (r:1 w:1)
|
||||
// Storage: Session KeyOwner (r:4 w:4)
|
||||
fn set_keys() -> Weight {
|
||||
(70_351_000 as Weight)
|
||||
(64_427_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Session NextKeys (r:1 w:1)
|
||||
// Storage: Session KeyOwner (r:0 w:4)
|
||||
fn purge_keys() -> Weight {
|
||||
(45_866_000 as Weight)
|
||||
(42_497_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
@@ -66,13 +72,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Session NextKeys (r:1 w:1)
|
||||
// Storage: Session KeyOwner (r:4 w:4)
|
||||
fn set_keys() -> Weight {
|
||||
(70_351_000 as Weight)
|
||||
(64_427_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Session NextKeys (r:1 w:1)
|
||||
// Storage: Session KeyOwner (r:0 w:4)
|
||||
fn purge_keys() -> Weight {
|
||||
(45_866_000 as Weight)
|
||||
(42_497_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_staking
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -78,281 +78,281 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_staking using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
fn bond() -> Weight {
|
||||
(77_492_000 as Weight)
|
||||
(72_423_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn bond_extra() -> Weight {
|
||||
(59_476_000 as Weight)
|
||||
(56_157_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
fn unbond() -> Weight {
|
||||
(63_655_000 as Weight)
|
||||
(59_039_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||
(54_534_000 as Weight)
|
||||
(51_503_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((24_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((59_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:2)
|
||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||
(89_850_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_396_000 as Weight).saturating_mul(s as Weight))
|
||||
(84_211_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((2_391_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
fn validate() -> Weight {
|
||||
(36_726_000 as Weight)
|
||||
(34_206_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:1)
|
||||
fn kick(k: u32, ) -> Weight {
|
||||
(19_497_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((17_057_000 as Weight).saturating_mul(k as Weight))
|
||||
(22_863_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((16_208_000 as Weight).saturating_mul(k as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:1)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking MaxNominatorsCount (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
fn nominate(n: u32, ) -> Weight {
|
||||
(45_146_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((5_527_000 as Weight).saturating_mul(n as Weight))
|
||||
(41_047_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((5_611_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
fn chill() -> Weight {
|
||||
(18_986_000 as Weight)
|
||||
(17_489_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
}
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
fn set_payee() -> Weight {
|
||||
(13_348_000 as Weight)
|
||||
(13_384_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
fn set_controller() -> Weight {
|
||||
(28_148_000 as Weight)
|
||||
(27_863_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking ValidatorCount (r:0 w:1)
|
||||
fn set_validator_count() -> Weight {
|
||||
(2_909_000 as Weight)
|
||||
(2_468_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_no_eras() -> Weight {
|
||||
(3_163_000 as Weight)
|
||||
(2_798_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_new_era() -> Weight {
|
||||
(3_141_000 as Weight)
|
||||
(2_763_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_new_era_always() -> Weight {
|
||||
(3_220_000 as Weight)
|
||||
(2_707_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking Invulnerables (r:0 w:1)
|
||||
fn set_invulnerables(v: u32, ) -> Weight {
|
||||
(3_569_000 as Weight)
|
||||
(3_353_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((58_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((56_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:2)
|
||||
fn force_unstake(s: u32, ) -> Weight {
|
||||
(65_753_000 as Weight)
|
||||
(60_682_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_420_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((2_384_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Staking UnappliedSlashes (r:1 w:1)
|
||||
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
||||
(3_056_514_000 as Weight)
|
||||
// Standard Error: 218_000
|
||||
.saturating_add((21_159_000 as Weight).saturating_mul(s as Weight))
|
||||
(3_368_335_000 as Weight)
|
||||
// Standard Error: 221_000
|
||||
.saturating_add((19_815_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
||||
(121_794_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((49_467_000 as Weight).saturating_mul(n as Weight))
|
||||
(108_594_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((46_477_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
||||
}
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Balances Locks (r:2 w:2)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:2 w:2)
|
||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
||||
(147_049_000 as Weight)
|
||||
// Standard Error: 30_000
|
||||
.saturating_add((64_428_000 as Weight).saturating_mul(n as Weight))
|
||||
(157_564_000 as Weight)
|
||||
// Standard Error: 20_000
|
||||
.saturating_add((59_781_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn rebond(l: u32, ) -> Weight {
|
||||
(52_184_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((35_000 as Weight).saturating_mul(l as Weight))
|
||||
(48_497_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((89_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
fn set_history_depth(e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 57_000
|
||||
.saturating_add((30_689_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 73_000
|
||||
.saturating_add((34_176_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
||||
}
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking SlashingSpans (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:1)
|
||||
fn reap_stash(s: u32, ) -> Weight {
|
||||
(75_836_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((2_423_000 as Weight).saturating_mul(s as Weight))
|
||||
(71_895_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_376_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: System BlockWeight (r:1 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:1)
|
||||
// Storage: Staking Nominators (r:101 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:101 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking Bonded (r:101 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:101 w:0)
|
||||
// Storage: Staking Nominators (r:101 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:1)
|
||||
// Storage: System BlockWeight (r:1 w:1)
|
||||
// Storage: Staking MinimumValidatorCount (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:1)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:1)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_492_000
|
||||
.saturating_add((299_860_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 99_000
|
||||
.saturating_add((47_937_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 980_000
|
||||
.saturating_add((300_866_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 49_000
|
||||
.saturating_add((46_397_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
@@ -361,17 +361,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
}
|
||||
// Storage: Staking Validators (r:501 w:0)
|
||||
// Storage: Staking Bonded (r:1500 w:0)
|
||||
// Storage: Staking Nominators (r:1001 w:0)
|
||||
// Storage: Staking Ledger (r:1500 w:0)
|
||||
// Storage: Staking SlashingSpans (r:21 w:0)
|
||||
// Storage: Staking Nominators (r:1001 w:0)
|
||||
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 101_000
|
||||
.saturating_add((27_304_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 101_000
|
||||
.saturating_add((29_893_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 3_441_000
|
||||
.saturating_add((91_111_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 98_000
|
||||
.saturating_add((24_916_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 98_000
|
||||
.saturating_add((26_575_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 3_335_000
|
||||
.saturating_add((22_464_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
@@ -381,28 +381,28 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn get_npos_targets(v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((11_692_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((10_706_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
}
|
||||
// Storage: Staking MaxNominatorsCount (r:0 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:0 w:1)
|
||||
// Storage: Staking MinValidatorBond (r:0 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:0 w:1)
|
||||
// Storage: Staking ChillThreshold (r:0 w:1)
|
||||
// Storage: Staking MaxNominatorsCount (r:0 w:1)
|
||||
// Storage: Staking MinNominatorBond (r:0 w:1)
|
||||
fn set_staking_limits() -> Weight {
|
||||
(7_325_000 as Weight)
|
||||
(6_463_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking ChillThreshold (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
fn chill_other() -> Weight {
|
||||
(62_683_000 as Weight)
|
||||
(56_717_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -410,281 +410,281 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
fn bond() -> Weight {
|
||||
(77_492_000 as Weight)
|
||||
(72_423_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn bond_extra() -> Weight {
|
||||
(59_476_000 as Weight)
|
||||
(56_157_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
fn unbond() -> Weight {
|
||||
(63_655_000 as Weight)
|
||||
(59_039_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||
(54_534_000 as Weight)
|
||||
(51_503_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((24_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((59_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:2)
|
||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||
(89_850_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_396_000 as Weight).saturating_mul(s as Weight))
|
||||
(84_211_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((2_391_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
fn validate() -> Weight {
|
||||
(36_726_000 as Weight)
|
||||
(34_206_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:1)
|
||||
fn kick(k: u32, ) -> Weight {
|
||||
(19_497_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((17_057_000 as Weight).saturating_mul(k as Weight))
|
||||
(22_863_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((16_208_000 as Weight).saturating_mul(k as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
||||
}
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:1)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking MaxNominatorsCount (r:1 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
fn nominate(n: u32, ) -> Weight {
|
||||
(45_146_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((5_527_000 as Weight).saturating_mul(n as Weight))
|
||||
(41_047_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((5_611_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
fn chill() -> Weight {
|
||||
(18_986_000 as Weight)
|
||||
(17_489_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
}
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
fn set_payee() -> Weight {
|
||||
(13_348_000 as Weight)
|
||||
(13_384_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
fn set_controller() -> Weight {
|
||||
(28_148_000 as Weight)
|
||||
(27_863_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking ValidatorCount (r:0 w:1)
|
||||
fn set_validator_count() -> Weight {
|
||||
(2_909_000 as Weight)
|
||||
(2_468_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_no_eras() -> Weight {
|
||||
(3_163_000 as Weight)
|
||||
(2_798_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_new_era() -> Weight {
|
||||
(3_141_000 as Weight)
|
||||
(2_763_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking ForceEra (r:0 w:1)
|
||||
fn force_new_era_always() -> Weight {
|
||||
(3_220_000 as Weight)
|
||||
(2_707_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking Invulnerables (r:0 w:1)
|
||||
fn set_invulnerables(v: u32, ) -> Weight {
|
||||
(3_569_000 as Weight)
|
||||
(3_353_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((58_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((56_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:2)
|
||||
fn force_unstake(s: u32, ) -> Weight {
|
||||
(65_753_000 as Weight)
|
||||
(60_682_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((2_420_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((2_384_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Staking UnappliedSlashes (r:1 w:1)
|
||||
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
||||
(3_056_514_000 as Weight)
|
||||
// Standard Error: 218_000
|
||||
.saturating_add((21_159_000 as Weight).saturating_mul(s as Weight))
|
||||
(3_368_335_000 as Weight)
|
||||
// Standard Error: 221_000
|
||||
.saturating_add((19_815_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
||||
(121_794_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((49_467_000 as Weight).saturating_mul(n as Weight))
|
||||
(108_594_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((46_477_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
||||
}
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Balances Locks (r:2 w:2)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorReward (r:1 w:0)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
// Storage: Staking Ledger (r:2 w:2)
|
||||
// Storage: Staking ErasStakersClipped (r:1 w:0)
|
||||
// Storage: Staking ErasRewardPoints (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
|
||||
// Storage: Staking Payee (r:2 w:0)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:2 w:2)
|
||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
||||
(147_049_000 as Weight)
|
||||
// Standard Error: 30_000
|
||||
.saturating_add((64_428_000 as Weight).saturating_mul(n as Weight))
|
||||
(157_564_000 as Weight)
|
||||
// Standard Error: 20_000
|
||||
.saturating_add((59_781_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(11 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
||||
}
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn rebond(l: u32, ) -> Weight {
|
||||
(52_184_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((35_000 as Weight).saturating_mul(l as Weight))
|
||||
(48_497_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((89_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
fn set_history_depth(e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 57_000
|
||||
.saturating_add((30_689_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 73_000
|
||||
.saturating_add((34_176_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
||||
}
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking SlashingSpans (r:1 w:1)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:0 w:1)
|
||||
// Storage: Staking Payee (r:0 w:1)
|
||||
// Storage: Staking SpanSlash (r:0 w:1)
|
||||
fn reap_stash(s: u32, ) -> Weight {
|
||||
(75_836_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((2_423_000 as Weight).saturating_mul(s as Weight))
|
||||
(71_895_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_376_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: System BlockWeight (r:1 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:1)
|
||||
// Storage: Staking Nominators (r:101 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
// Storage: Staking Ledger (r:101 w:0)
|
||||
// Storage: Staking Validators (r:2 w:0)
|
||||
// Storage: Staking Bonded (r:101 w:0)
|
||||
// Storage: Staking CounterForNominators (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:101 w:0)
|
||||
// Storage: Staking Nominators (r:101 w:0)
|
||||
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:1)
|
||||
// Storage: System BlockWeight (r:1 w:1)
|
||||
// Storage: Staking MinimumValidatorCount (r:1 w:0)
|
||||
// Storage: Staking CurrentEra (r:1 w:1)
|
||||
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:1)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:1)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_492_000
|
||||
.saturating_add((299_860_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 99_000
|
||||
.saturating_add((47_937_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 980_000
|
||||
.saturating_add((300_866_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 49_000
|
||||
.saturating_add((46_397_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
@@ -693,17 +693,17 @@ impl WeightInfo for () {
|
||||
}
|
||||
// Storage: Staking Validators (r:501 w:0)
|
||||
// Storage: Staking Bonded (r:1500 w:0)
|
||||
// Storage: Staking Nominators (r:1001 w:0)
|
||||
// Storage: Staking Ledger (r:1500 w:0)
|
||||
// Storage: Staking SlashingSpans (r:21 w:0)
|
||||
// Storage: Staking Nominators (r:1001 w:0)
|
||||
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 101_000
|
||||
.saturating_add((27_304_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 101_000
|
||||
.saturating_add((29_893_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 3_441_000
|
||||
.saturating_add((91_111_000 as Weight).saturating_mul(s as Weight))
|
||||
// Standard Error: 98_000
|
||||
.saturating_add((24_916_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 98_000
|
||||
.saturating_add((26_575_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 3_335_000
|
||||
.saturating_add((22_464_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||
@@ -713,28 +713,28 @@ impl WeightInfo for () {
|
||||
fn get_npos_targets(v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((11_692_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((10_706_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
}
|
||||
// Storage: Staking MaxNominatorsCount (r:0 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:0 w:1)
|
||||
// Storage: Staking MinValidatorBond (r:0 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:0 w:1)
|
||||
// Storage: Staking ChillThreshold (r:0 w:1)
|
||||
// Storage: Staking MaxNominatorsCount (r:0 w:1)
|
||||
// Storage: Staking MinNominatorBond (r:0 w:1)
|
||||
fn set_staking_limits() -> Weight {
|
||||
(7_325_000 as Weight)
|
||||
(6_463_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking ChillThreshold (r:1 w:0)
|
||||
// Storage: Staking Nominators (r:1 w:0)
|
||||
// Storage: Staking Validators (r:1 w:1)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: Staking MaxValidatorsCount (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
// Storage: Staking MinValidatorBond (r:1 w:0)
|
||||
fn chill_other() -> Weight {
|
||||
(62_683_000 as Weight)
|
||||
(56_717_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ benchmarks! {
|
||||
assert_eq!(System::<T>::digest().logs.len(), (d + 1) as usize)
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
set_storage {
|
||||
let i in 1 .. 1000;
|
||||
|
||||
@@ -95,6 +96,7 @@ benchmarks! {
|
||||
assert_eq!(value, last_hash.as_ref().to_vec());
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
kill_storage {
|
||||
let i in 1 .. 1000;
|
||||
|
||||
@@ -116,6 +118,7 @@ benchmarks! {
|
||||
assert_eq!(storage::unhashed::get_raw(last_hash.as_ref()), None);
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
kill_prefix {
|
||||
let p in 1 .. 1000;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for frame_system
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-20, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -58,40 +58,46 @@ pub trait WeightInfo {
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn remark(b: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
(574_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
|
||||
}
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
(16_569_000 as Weight)
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
}
|
||||
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
|
||||
fn set_heap_pages() -> Weight {
|
||||
(1_783_000 as Weight)
|
||||
(1_891_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Digest (r:1 w:1)
|
||||
// Storage: unknown [0x3a6368616e6765735f74726965] (r:0 w:1)
|
||||
fn set_changes_trie_config() -> Weight {
|
||||
(7_727_000 as Weight)
|
||||
(7_370_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn set_storage(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((875_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add((848_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn kill_storage(i: u32, ) -> Weight {
|
||||
(4_216_000 as Weight)
|
||||
(308_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((555_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add((559_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn kill_prefix(p: u32, ) -> Weight {
|
||||
(14_558_000 as Weight)
|
||||
(7_616_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((781_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((783_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
}
|
||||
@@ -99,40 +105,46 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
fn remark(b: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
(574_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
|
||||
}
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
(16_569_000 as Weight)
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
}
|
||||
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
|
||||
fn set_heap_pages() -> Weight {
|
||||
(1_783_000 as Weight)
|
||||
(1_891_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Digest (r:1 w:1)
|
||||
// Storage: unknown [0x3a6368616e6765735f74726965] (r:0 w:1)
|
||||
fn set_changes_trie_config() -> Weight {
|
||||
(7_727_000 as Weight)
|
||||
(7_370_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn set_storage(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((875_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add((848_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn kill_storage(i: u32, ) -> Weight {
|
||||
(4_216_000 as Weight)
|
||||
(308_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((555_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add((559_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn kill_prefix(p: u32, ) -> Weight {
|
||||
(14_558_000 as Weight)
|
||||
(7_616_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((781_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add((783_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_timestamp
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -52,24 +52,28 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_timestamp using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Timestamp Now (r:1 w:1)
|
||||
// Storage: Babe CurrentSlot (r:1 w:0)
|
||||
fn set() -> Weight {
|
||||
(10_277_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
(10_391_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_finalize() -> Weight {
|
||||
(4_859_000 as Weight)
|
||||
(4_843_000 as Weight)
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Timestamp Now (r:1 w:1)
|
||||
// Storage: Babe CurrentSlot (r:1 w:0)
|
||||
fn set() -> Weight {
|
||||
(10_277_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
(10_391_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_finalize() -> Weight {
|
||||
(4_859_000 as Weight)
|
||||
(4_843_000 as Weight)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_tips
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -56,45 +56,60 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_tips using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Treasury Reasons (r:1 w:1)
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
fn report_awesome(r: u32, ) -> Weight {
|
||||
(49_844_000 as Weight)
|
||||
(50_921_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn retract_tip() -> Weight {
|
||||
(45_934_000 as Weight)
|
||||
(46_352_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Treasury Reasons (r:1 w:1)
|
||||
// Storage: Treasury Tips (r:0 w:1)
|
||||
fn tip_new(r: u32, t: u32, ) -> Weight {
|
||||
(31_777_000 as Weight)
|
||||
(33_338_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((127_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((115_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
fn tip(t: u32, ) -> Weight {
|
||||
(22_361_000 as Weight)
|
||||
(22_702_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((584_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((538_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn close_tip(t: u32, ) -> Weight {
|
||||
(84_470_000 as Weight)
|
||||
(84_094_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((326_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((283_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn slash_tip(t: u32, ) -> Weight {
|
||||
(25_214_000 as Weight)
|
||||
(24_891_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((8_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((6_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -102,45 +117,60 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Treasury Reasons (r:1 w:1)
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
fn report_awesome(r: u32, ) -> Weight {
|
||||
(49_844_000 as Weight)
|
||||
(50_921_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn retract_tip() -> Weight {
|
||||
(45_934_000 as Weight)
|
||||
(46_352_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Treasury Reasons (r:1 w:1)
|
||||
// Storage: Treasury Tips (r:0 w:1)
|
||||
fn tip_new(r: u32, t: u32, ) -> Weight {
|
||||
(31_777_000 as Weight)
|
||||
(33_338_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((127_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((115_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
fn tip(t: u32, ) -> Weight {
|
||||
(22_361_000 as Weight)
|
||||
(22_702_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((584_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((538_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn close_tip(t: u32, ) -> Weight {
|
||||
(84_470_000 as Weight)
|
||||
(84_094_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((326_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((283_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Treasury Tips (r:1 w:1)
|
||||
// Storage: Treasury Reasons (r:0 w:1)
|
||||
fn slash_tip(t: u32, ) -> Weight {
|
||||
(25_214_000 as Weight)
|
||||
(24_891_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((8_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((6_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_transaction_storage
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -53,6 +53,12 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_transaction_storage using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TransactionStorage MaxTransactionSize (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
// Storage: TransactionStorage EntryFee (r:1 w:0)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn store(l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
@@ -60,13 +66,24 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
// Storage: TransactionStorage EntryFee (r:1 w:0)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn renew() -> Weight {
|
||||
(65_933_000 as Weight)
|
||||
(67_532_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: TransactionStorage ProofChecked (r:1 w:1)
|
||||
// Storage: TransactionStorage StoragePeriod (r:1 w:0)
|
||||
// Storage: TransactionStorage ChunkCount (r:1 w:0)
|
||||
// Storage: System ParentHash (r:1 w:0)
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
fn check_proof_max() -> Weight {
|
||||
(163_549_000 as Weight)
|
||||
(182_886_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -74,6 +91,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: TransactionStorage MaxTransactionSize (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
// Storage: TransactionStorage EntryFee (r:1 w:0)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn store(l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
@@ -81,13 +104,24 @@ impl WeightInfo for () {
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
// Storage: TransactionStorage EntryFee (r:1 w:0)
|
||||
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn renew() -> Weight {
|
||||
(65_933_000 as Weight)
|
||||
(67_532_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: TransactionStorage ProofChecked (r:1 w:1)
|
||||
// Storage: TransactionStorage StoragePeriod (r:1 w:0)
|
||||
// Storage: TransactionStorage ChunkCount (r:1 w:0)
|
||||
// Storage: System ParentHash (r:1 w:0)
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
fn check_proof_max() -> Weight {
|
||||
(163_549_000 as Weight)
|
||||
(182_886_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_treasury
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-13, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -54,27 +54,37 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_treasury using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Treasury ProposalCount (r:1 w:1)
|
||||
// Storage: Treasury Proposals (r:0 w:1)
|
||||
fn propose_spend() -> Weight {
|
||||
(42_325_000 as Weight)
|
||||
(41_567_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Proposals (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn reject_proposal() -> Weight {
|
||||
(39_633_000 as Weight)
|
||||
(38_993_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Proposals (r:1 w:0)
|
||||
// Storage: Treasury Approvals (r:1 w:1)
|
||||
fn approve_proposal(p: u32, ) -> Weight {
|
||||
(14_337_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((116_000 as Weight).saturating_mul(p as Weight))
|
||||
(13_543_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((55_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Approvals (r:1 w:1)
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
// Storage: Treasury Proposals (r:2 w:2)
|
||||
// Storage: System Account (r:4 w:4)
|
||||
fn on_initialize_proposals(p: u32, ) -> Weight {
|
||||
(50_379_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((59_595_000 as Weight).saturating_mul(p as Weight))
|
||||
(51_708_000 as Weight)
|
||||
// Standard Error: 21_000
|
||||
.saturating_add((57_926_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
@@ -84,27 +94,37 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Treasury ProposalCount (r:1 w:1)
|
||||
// Storage: Treasury Proposals (r:0 w:1)
|
||||
fn propose_spend() -> Weight {
|
||||
(42_325_000 as Weight)
|
||||
(41_567_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Proposals (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn reject_proposal() -> Weight {
|
||||
(39_633_000 as Weight)
|
||||
(38_993_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Treasury Proposals (r:1 w:0)
|
||||
// Storage: Treasury Approvals (r:1 w:1)
|
||||
fn approve_proposal(p: u32, ) -> Weight {
|
||||
(14_337_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((116_000 as Weight).saturating_mul(p as Weight))
|
||||
(13_543_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((55_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Treasury Approvals (r:1 w:1)
|
||||
// Storage: Treasury BountyApprovals (r:1 w:1)
|
||||
// Storage: Treasury Proposals (r:2 w:2)
|
||||
// Storage: System Account (r:4 w:4)
|
||||
fn on_initialize_proposals(p: u32, ) -> Weight {
|
||||
(50_379_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((59_595_000 as Weight).saturating_mul(p as Weight))
|
||||
(51_708_000 as Weight)
|
||||
// Standard Error: 21_000
|
||||
.saturating_add((57_926_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_uniques
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -72,24 +72,32 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_uniques using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn create() -> Weight {
|
||||
(43_219_000 as Weight)
|
||||
(42_138_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn force_create() -> Weight {
|
||||
(21_919_000 as Weight)
|
||||
(22_238_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:0 w:1000)
|
||||
// Storage: Uniques ClassMetadataOf (r:0 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:0 w:1000)
|
||||
// Storage: Uniques Account (r:0 w:20)
|
||||
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((16_619_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((967_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((834_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((16_171_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((1_058_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((953_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
@@ -97,102 +105,141 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:1)
|
||||
fn mint() -> Weight {
|
||||
(57_627_000 as Weight)
|
||||
(55_359_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:1)
|
||||
fn burn() -> Weight {
|
||||
(58_615_000 as Weight)
|
||||
(58_254_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:2)
|
||||
fn transfer() -> Weight {
|
||||
(43_335_000 as Weight)
|
||||
(42_906_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:100 w:100)
|
||||
fn redeposit(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((26_322_000 as Weight).saturating_mul(i as Weight))
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((25_237_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
fn freeze() -> Weight {
|
||||
(31_020_000 as Weight)
|
||||
(30_153_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
fn thaw() -> Weight {
|
||||
(31_012_000 as Weight)
|
||||
(31_212_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn freeze_class() -> Weight {
|
||||
(22_761_000 as Weight)
|
||||
(22_689_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn thaw_class() -> Weight {
|
||||
(22_789_000 as Weight)
|
||||
(22_647_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_ownership() -> Weight {
|
||||
(50_779_000 as Weight)
|
||||
(50_902_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn set_team() -> Weight {
|
||||
(24_045_000 as Weight)
|
||||
(23_632_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn force_asset_status() -> Weight {
|
||||
(22_925_000 as Weight)
|
||||
(22_508_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:1 w:1)
|
||||
fn set_attribute() -> Weight {
|
||||
(70_416_000 as Weight)
|
||||
(69_942_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:1 w:1)
|
||||
fn clear_attribute() -> Weight {
|
||||
(64_640_000 as Weight)
|
||||
(62_314_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
|
||||
fn set_metadata() -> Weight {
|
||||
(53_229_000 as Weight)
|
||||
(52_647_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
|
||||
fn clear_metadata() -> Weight {
|
||||
(52_145_000 as Weight)
|
||||
(50_391_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques ClassMetadataOf (r:1 w:1)
|
||||
fn set_class_metadata() -> Weight {
|
||||
(51_556_000 as Weight)
|
||||
(50_928_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques ClassMetadataOf (r:1 w:1)
|
||||
fn clear_class_metadata() -> Weight {
|
||||
(47_314_000 as Weight)
|
||||
(46_667_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
fn approve_transfer() -> Weight {
|
||||
(32_946_000 as Weight)
|
||||
(32_111_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
fn cancel_approval() -> Weight {
|
||||
(32_328_000 as Weight)
|
||||
(32_627_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -200,24 +247,32 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn create() -> Weight {
|
||||
(43_219_000 as Weight)
|
||||
(42_138_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn force_create() -> Weight {
|
||||
(21_919_000 as Weight)
|
||||
(22_238_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:0 w:1000)
|
||||
// Storage: Uniques ClassMetadataOf (r:0 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:0 w:1000)
|
||||
// Storage: Uniques Account (r:0 w:20)
|
||||
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((16_619_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((967_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((834_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((16_171_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((1_058_000 as Weight).saturating_mul(m as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((953_000 as Weight).saturating_mul(a as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
@@ -225,102 +280,141 @@ impl WeightInfo for () {
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(m as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:1)
|
||||
fn mint() -> Weight {
|
||||
(57_627_000 as Weight)
|
||||
(55_359_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:1)
|
||||
fn burn() -> Weight {
|
||||
(58_615_000 as Weight)
|
||||
(58_254_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Account (r:0 w:2)
|
||||
fn transfer() -> Weight {
|
||||
(43_335_000 as Weight)
|
||||
(42_906_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques Asset (r:100 w:100)
|
||||
fn redeposit(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((26_322_000 as Weight).saturating_mul(i as Weight))
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((25_237_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
fn freeze() -> Weight {
|
||||
(31_020_000 as Weight)
|
||||
(30_153_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
fn thaw() -> Weight {
|
||||
(31_012_000 as Weight)
|
||||
(31_212_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn freeze_class() -> Weight {
|
||||
(22_761_000 as Weight)
|
||||
(22_689_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn thaw_class() -> Weight {
|
||||
(22_789_000 as Weight)
|
||||
(22_647_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_ownership() -> Weight {
|
||||
(50_779_000 as Weight)
|
||||
(50_902_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn set_team() -> Weight {
|
||||
(24_045_000 as Weight)
|
||||
(23_632_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
fn force_asset_status() -> Weight {
|
||||
(22_925_000 as Weight)
|
||||
(22_508_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:1 w:1)
|
||||
fn set_attribute() -> Weight {
|
||||
(70_416_000 as Weight)
|
||||
(69_942_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
|
||||
// Storage: Uniques Attribute (r:1 w:1)
|
||||
fn clear_attribute() -> Weight {
|
||||
(64_640_000 as Weight)
|
||||
(62_314_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
|
||||
fn set_metadata() -> Weight {
|
||||
(53_229_000 as Weight)
|
||||
(52_647_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
|
||||
fn clear_metadata() -> Weight {
|
||||
(52_145_000 as Weight)
|
||||
(50_391_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:1)
|
||||
// Storage: Uniques ClassMetadataOf (r:1 w:1)
|
||||
fn set_class_metadata() -> Weight {
|
||||
(51_556_000 as Weight)
|
||||
(50_928_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques ClassMetadataOf (r:1 w:1)
|
||||
fn clear_class_metadata() -> Weight {
|
||||
(47_314_000 as Weight)
|
||||
(46_667_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
fn approve_transfer() -> Weight {
|
||||
(32_946_000 as Weight)
|
||||
(32_111_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Uniques Class (r:1 w:0)
|
||||
// Storage: Uniques Asset (r:1 w:1)
|
||||
fn cancel_approval() -> Weight {
|
||||
(32_328_000 as Weight)
|
||||
(32_627_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
@@ -40,5 +40,6 @@ std = [
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = ["frame-support/try-runtime"]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_utility
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-07-14, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -54,33 +54,33 @@ pub trait WeightInfo {
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
(20_779_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_080_000 as Weight).saturating_mul(c as Weight))
|
||||
(30_319_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((6_759_000 as Weight).saturating_mul(c as Weight))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
(3_994_000 as Weight)
|
||||
(4_030_000 as Weight)
|
||||
}
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
(22_183_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_506_000 as Weight).saturating_mul(c as Weight))
|
||||
(26_621_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((7_251_000 as Weight).saturating_mul(c as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
(20_779_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_080_000 as Weight).saturating_mul(c as Weight))
|
||||
(30_319_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((6_759_000 as Weight).saturating_mul(c as Weight))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
(3_994_000 as Weight)
|
||||
(4_030_000 as Weight)
|
||||
}
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
(22_183_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_506_000 as Weight).saturating_mul(c as Weight))
|
||||
(26_621_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((7_251_000 as Weight).saturating_mul(c as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//! Autogenerated weights for pallet_vesting
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -56,45 +56,61 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_vesting using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Vesting Vesting (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_locked(l: u32, ) -> Weight {
|
||||
(42_905_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((232_000 as Weight).saturating_mul(l as Weight))
|
||||
(42_983_000 as Weight)
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((190_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_unlocked(l: u32, ) -> Weight {
|
||||
(45_650_000 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((215_000 as Weight).saturating_mul(l as Weight))
|
||||
(46_213_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((158_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_locked(l: u32, ) -> Weight {
|
||||
(42_273_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((246_000 as Weight).saturating_mul(l as Weight))
|
||||
(42_644_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((202_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_unlocked(l: u32, ) -> Weight {
|
||||
(45_324_000 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(l as Weight))
|
||||
(45_765_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((159_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vested_transfer(l: u32, ) -> Weight {
|
||||
(96_661_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((211_000 as Weight).saturating_mul(l as Weight))
|
||||
(97_417_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((235_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn force_vested_transfer(l: u32, ) -> Weight {
|
||||
(98_812_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((139_000 as Weight).saturating_mul(l as Weight))
|
||||
(97_661_000 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((239_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
@@ -102,45 +118,61 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Vesting Vesting (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_locked(l: u32, ) -> Weight {
|
||||
(42_905_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((232_000 as Weight).saturating_mul(l as Weight))
|
||||
(42_983_000 as Weight)
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((190_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_unlocked(l: u32, ) -> Weight {
|
||||
(45_650_000 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((215_000 as Weight).saturating_mul(l as Weight))
|
||||
(46_213_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((158_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:0)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_locked(l: u32, ) -> Weight {
|
||||
(42_273_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((246_000 as Weight).saturating_mul(l as Weight))
|
||||
(42_644_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((202_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_unlocked(l: u32, ) -> Weight {
|
||||
(45_324_000 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((214_000 as Weight).saturating_mul(l as Weight))
|
||||
(45_765_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((159_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vested_transfer(l: u32, ) -> Weight {
|
||||
(96_661_000 as Weight)
|
||||
// Standard Error: 10_000
|
||||
.saturating_add((211_000 as Weight).saturating_mul(l as Weight))
|
||||
(97_417_000 as Weight)
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((235_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn force_vested_transfer(l: u32, ) -> Weight {
|
||||
(98_812_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((139_000 as Weight).saturating_mul(l as Weight))
|
||||
(97_661_000 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((239_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
use crate::BenchmarkCmd;
|
||||
use codec::{Decode, Encode};
|
||||
use frame_benchmarking::{
|
||||
Analysis, BenchmarkBatch, BenchmarkList, BenchmarkResults, BenchmarkSelector,
|
||||
Analysis, BenchmarkBatch, BenchmarkBatchSplitResults, BenchmarkList, BenchmarkParameter,
|
||||
BenchmarkResults, BenchmarkSelector,
|
||||
};
|
||||
use frame_support::traits::StorageInfo;
|
||||
use linked_hash_map::LinkedHashMap;
|
||||
@@ -38,14 +39,18 @@ use std::{fmt::Debug, sync::Arc, time};
|
||||
|
||||
// This takes multiple benchmark batches and combines all the results where the pallet, instance,
|
||||
// and benchmark are the same.
|
||||
fn combine_batches(batches: Vec<BenchmarkBatch>) -> Vec<BenchmarkBatch> {
|
||||
if batches.is_empty() {
|
||||
return batches
|
||||
fn combine_batches(
|
||||
time_batches: Vec<BenchmarkBatch>,
|
||||
db_batches: Vec<BenchmarkBatch>,
|
||||
) -> Vec<BenchmarkBatchSplitResults> {
|
||||
if time_batches.is_empty() && db_batches.is_empty() {
|
||||
return Default::default()
|
||||
}
|
||||
|
||||
let mut all_benchmarks = LinkedHashMap::<_, Vec<BenchmarkResults>>::new();
|
||||
let mut all_benchmarks =
|
||||
LinkedHashMap::<_, (Vec<BenchmarkResults>, Vec<BenchmarkResults>)>::new();
|
||||
|
||||
batches
|
||||
db_batches
|
||||
.into_iter()
|
||||
.for_each(|BenchmarkBatch { pallet, instance, benchmark, results }| {
|
||||
// We use this key to uniquely identify a benchmark among batches.
|
||||
@@ -53,21 +58,31 @@ fn combine_batches(batches: Vec<BenchmarkBatch>) -> Vec<BenchmarkBatch> {
|
||||
|
||||
match all_benchmarks.get_mut(&key) {
|
||||
// We already have this benchmark, so we extend the results.
|
||||
Some(x) => x.extend(results),
|
||||
Some(x) => x.1.extend(results),
|
||||
// New benchmark, so we add a new entry with the initial results.
|
||||
None => {
|
||||
all_benchmarks.insert(key, results);
|
||||
all_benchmarks.insert(key, (Vec::new(), results));
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
time_batches
|
||||
.into_iter()
|
||||
.for_each(|BenchmarkBatch { pallet, instance, benchmark, results }| {
|
||||
// We use this key to uniquely identify a benchmark among batches.
|
||||
let key = (pallet, instance, benchmark);
|
||||
|
||||
match all_benchmarks.get_mut(&key) {
|
||||
// We already have this benchmark, so we extend the results.
|
||||
Some(x) => x.0.extend(results),
|
||||
None => panic!("all benchmark keys should have been populated by db batches"),
|
||||
}
|
||||
});
|
||||
|
||||
all_benchmarks
|
||||
.into_iter()
|
||||
.map(|((pallet, instance, benchmark), results)| BenchmarkBatch {
|
||||
pallet,
|
||||
instance,
|
||||
benchmark,
|
||||
results,
|
||||
.map(|((pallet, instance, benchmark), (time_results, db_results))| {
|
||||
BenchmarkBatchSplitResults { pallet, instance, benchmark, time_results, db_results }
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
@@ -110,7 +125,14 @@ impl BenchmarkCmd {
|
||||
let genesis_storage = spec.build_storage()?;
|
||||
let mut changes = Default::default();
|
||||
let cache_size = Some(self.database_cache_size as usize);
|
||||
let state = BenchmarkingState::<BB>::new(genesis_storage, cache_size, self.record_proof)?;
|
||||
let state_with_tracking = BenchmarkingState::<BB>::new(
|
||||
genesis_storage.clone(),
|
||||
cache_size,
|
||||
self.record_proof,
|
||||
true,
|
||||
)?;
|
||||
let state_without_tracking =
|
||||
BenchmarkingState::<BB>::new(genesis_storage, cache_size, self.record_proof, false)?;
|
||||
let executor = NativeExecutor::<ExecDispatch>::new(
|
||||
wasm_method,
|
||||
self.heap_pages,
|
||||
@@ -129,15 +151,16 @@ impl BenchmarkCmd {
|
||||
};
|
||||
|
||||
// Get Benchmark List
|
||||
let state = &state_without_tracking;
|
||||
let result = StateMachine::<_, _, NumberFor<BB>, _>::new(
|
||||
&state,
|
||||
state,
|
||||
None,
|
||||
&mut changes,
|
||||
&executor,
|
||||
"Benchmark_benchmark_metadata",
|
||||
&(self.extra).encode(),
|
||||
extensions(),
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(&state).runtime_code()?,
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(state).runtime_code()?,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
)
|
||||
.execute(strategy.into())
|
||||
@@ -147,35 +170,81 @@ impl BenchmarkCmd {
|
||||
<(Vec<BenchmarkList>, Vec<StorageInfo>) as Decode>::decode(&mut &result[..])
|
||||
.map_err(|e| format!("Failed to decode benchmark metadata: {:?}", e))?;
|
||||
|
||||
if self.list {
|
||||
list_benchmark(pallet, extrinsic, list);
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
// Use the benchmark list and the user input to determine the set of benchmarks to run.
|
||||
let mut benchmarks_to_run = Vec::new();
|
||||
for item in list {
|
||||
if pallet == &item.pallet[..] || pallet == &b"*"[..] {
|
||||
if &pallet[..] == &b"*"[..] || &extrinsic[..] == &b"*"[..] {
|
||||
for benchmark in item.benchmarks {
|
||||
benchmarks_to_run.push((item.pallet.clone(), benchmark));
|
||||
list.iter()
|
||||
.filter(|item| pallet.is_empty() || pallet == &b"*"[..] || pallet == &item.pallet[..])
|
||||
.for_each(|item| {
|
||||
for benchmark in &item.benchmarks {
|
||||
if extrinsic.is_empty() ||
|
||||
&extrinsic[..] == &b"*"[..] ||
|
||||
extrinsic == benchmark.name
|
||||
{
|
||||
benchmarks_to_run.push((
|
||||
item.pallet.clone(),
|
||||
benchmark.name.clone(),
|
||||
benchmark.components.clone(),
|
||||
))
|
||||
}
|
||||
} else {
|
||||
benchmarks_to_run.push((pallet.to_vec(), extrinsic.to_vec()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if benchmarks_to_run.is_empty() {
|
||||
return Err("No benchmarks found which match your input.".into())
|
||||
}
|
||||
|
||||
if self.list {
|
||||
// List benchmarks instead of running them
|
||||
list_benchmark(benchmarks_to_run);
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
// Run the benchmarks
|
||||
let mut batches = Vec::new();
|
||||
let mut batches_db = Vec::new();
|
||||
let mut timer = time::SystemTime::now();
|
||||
for (pallet, extrinsic) in benchmarks_to_run {
|
||||
for s in 0..self.steps {
|
||||
for r in 0..self.repeat {
|
||||
// This should run only a single instance of a benchmark for `pallet` and
|
||||
// `extrinsic`. All loops happen above.
|
||||
let result = StateMachine::<_, _, NumberFor<BB>, _>::new(
|
||||
&state,
|
||||
for (pallet, extrinsic, components) in benchmarks_to_run {
|
||||
let all_components = if components.is_empty() {
|
||||
vec![Default::default()]
|
||||
} else {
|
||||
let mut all_components = Vec::new();
|
||||
for (idx, (name, low, high)) in components.iter().enumerate() {
|
||||
let lowest = self.lowest_range_values.get(idx).cloned().unwrap_or(*low);
|
||||
let highest = self.highest_range_values.get(idx).cloned().unwrap_or(*high);
|
||||
|
||||
let diff = highest - lowest;
|
||||
|
||||
// Create up to `STEPS` steps for that component between high and low.
|
||||
let step_size = (diff / self.steps).max(1);
|
||||
let num_of_steps = diff / step_size + 1;
|
||||
for s in 0..num_of_steps {
|
||||
// This is the value we will be testing for component `name`
|
||||
let component_value = lowest + step_size * s;
|
||||
|
||||
// Select the max value for all the other components.
|
||||
let c: Vec<(BenchmarkParameter, u32)> = components
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(idx, (n, _, h))| {
|
||||
if n == name {
|
||||
(*n, component_value)
|
||||
} else {
|
||||
(*n, *self.highest_range_values.get(idx).unwrap_or(h))
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
all_components.push(c);
|
||||
}
|
||||
}
|
||||
all_components
|
||||
};
|
||||
for (s, selected_components) in all_components.iter().enumerate() {
|
||||
// First we run a verification
|
||||
if !self.no_verify {
|
||||
// Dont use these results since verification code will add overhead
|
||||
let state = &state_without_tracking;
|
||||
let _results = StateMachine::<_, _, NumberFor<BB>, _>::new(
|
||||
state,
|
||||
None,
|
||||
&mut changes,
|
||||
&executor,
|
||||
@@ -183,16 +252,73 @@ impl BenchmarkCmd {
|
||||
&(
|
||||
&pallet.clone(),
|
||||
&extrinsic.clone(),
|
||||
self.lowest_range_values.clone(),
|
||||
self.highest_range_values.clone(),
|
||||
(s, self.steps),
|
||||
(r, self.repeat),
|
||||
!self.no_verify,
|
||||
self.extra,
|
||||
&selected_components.clone(),
|
||||
true, // run verification code
|
||||
1, // no need to do internal repeats
|
||||
)
|
||||
.encode(),
|
||||
extensions(),
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(&state)
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(state)
|
||||
.runtime_code()?,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
)
|
||||
.execute(strategy.into())
|
||||
.map_err(|e| {
|
||||
format!("Error executing and verifying runtime benchmark: {:?}", e)
|
||||
})?;
|
||||
}
|
||||
// Do one loop of DB tracking.
|
||||
{
|
||||
let state = &state_with_tracking;
|
||||
let result = StateMachine::<_, _, NumberFor<BB>, _>::new(
|
||||
state, // todo remove tracking
|
||||
None,
|
||||
&mut changes,
|
||||
&executor,
|
||||
"Benchmark_dispatch_benchmark",
|
||||
&(
|
||||
&pallet.clone(),
|
||||
&extrinsic.clone(),
|
||||
&selected_components.clone(),
|
||||
false, // dont run verification code for final values
|
||||
self.repeat,
|
||||
)
|
||||
.encode(),
|
||||
extensions(),
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(state)
|
||||
.runtime_code()?,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
)
|
||||
.execute(strategy.into())
|
||||
.map_err(|e| format!("Error executing runtime benchmark: {:?}", e))?;
|
||||
|
||||
let batch =
|
||||
<std::result::Result<Vec<BenchmarkBatch>, String> as Decode>::decode(
|
||||
&mut &result[..],
|
||||
)
|
||||
.map_err(|e| format!("Failed to decode benchmark results: {:?}", e))??;
|
||||
|
||||
batches_db.extend(batch);
|
||||
}
|
||||
// Finally run a bunch of loops to get extrinsic timing information.
|
||||
for r in 0..self.external_repeat {
|
||||
let state = &state_without_tracking;
|
||||
let result = StateMachine::<_, _, NumberFor<BB>, _>::new(
|
||||
state, // todo remove tracking
|
||||
None,
|
||||
&mut changes,
|
||||
&executor,
|
||||
"Benchmark_dispatch_benchmark",
|
||||
&(
|
||||
&pallet.clone(),
|
||||
&extrinsic.clone(),
|
||||
&selected_components.clone(),
|
||||
false, // dont run verification code for final values
|
||||
self.repeat,
|
||||
)
|
||||
.encode(),
|
||||
extensions(),
|
||||
&sp_state_machine::backend::BackendRuntimeCode::new(state)
|
||||
.runtime_code()?,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
)
|
||||
@@ -217,10 +343,10 @@ impl BenchmarkCmd {
|
||||
.expect("Encoded from String; qed"),
|
||||
String::from_utf8(extrinsic.clone())
|
||||
.expect("Encoded from String; qed"),
|
||||
s,
|
||||
s, // todo show step
|
||||
self.steps,
|
||||
r,
|
||||
self.repeat,
|
||||
self.external_repeat,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -230,7 +356,7 @@ impl BenchmarkCmd {
|
||||
|
||||
// Combine all of the benchmark results, so that benchmarks of the same pallet/function
|
||||
// are together.
|
||||
let batches = combine_batches(batches);
|
||||
let batches: Vec<BenchmarkBatchSplitResults> = combine_batches(batches, batches_db);
|
||||
|
||||
if let Some(output_path) = &self.output {
|
||||
crate::writer::write_results(&batches, &storage_info, output_path, self)?;
|
||||
@@ -249,17 +375,20 @@ impl BenchmarkCmd {
|
||||
);
|
||||
|
||||
// Skip raw data + analysis if there are no results
|
||||
if batch.results.is_empty() {
|
||||
if batch.time_results.is_empty() {
|
||||
continue
|
||||
}
|
||||
|
||||
if self.raw_data {
|
||||
// Print the table header
|
||||
batch.results[0].components.iter().for_each(|param| print!("{:?},", param.0));
|
||||
batch.time_results[0]
|
||||
.components
|
||||
.iter()
|
||||
.for_each(|param| print!("{:?},", param.0));
|
||||
|
||||
print!("extrinsic_time_ns,storage_root_time_ns,reads,repeat_reads,writes,repeat_writes,proof_size_bytes\n");
|
||||
// Print the values
|
||||
batch.results.iter().for_each(|result| {
|
||||
batch.time_results.iter().for_each(|result| {
|
||||
let parameters = &result.components;
|
||||
parameters.iter().for_each(|param| print!("{:?},", param.1));
|
||||
// Print extrinsic time and storage root time
|
||||
@@ -282,17 +411,17 @@ impl BenchmarkCmd {
|
||||
if !self.no_median_slopes {
|
||||
println!("Median Slopes Analysis\n========");
|
||||
if let Some(analysis) =
|
||||
Analysis::median_slopes(&batch.results, BenchmarkSelector::ExtrinsicTime)
|
||||
Analysis::median_slopes(&batch.time_results, BenchmarkSelector::ExtrinsicTime)
|
||||
{
|
||||
println!("-- Extrinsic Time --\n{}", analysis);
|
||||
}
|
||||
if let Some(analysis) =
|
||||
Analysis::median_slopes(&batch.results, BenchmarkSelector::Reads)
|
||||
Analysis::median_slopes(&batch.db_results, BenchmarkSelector::Reads)
|
||||
{
|
||||
println!("Reads = {:?}", analysis);
|
||||
}
|
||||
if let Some(analysis) =
|
||||
Analysis::median_slopes(&batch.results, BenchmarkSelector::Writes)
|
||||
Analysis::median_slopes(&batch.db_results, BenchmarkSelector::Writes)
|
||||
{
|
||||
println!("Writes = {:?}", analysis);
|
||||
}
|
||||
@@ -300,17 +429,17 @@ impl BenchmarkCmd {
|
||||
if !self.no_min_squares {
|
||||
println!("Min Squares Analysis\n========");
|
||||
if let Some(analysis) =
|
||||
Analysis::min_squares_iqr(&batch.results, BenchmarkSelector::ExtrinsicTime)
|
||||
Analysis::min_squares_iqr(&batch.time_results, BenchmarkSelector::ExtrinsicTime)
|
||||
{
|
||||
println!("-- Extrinsic Time --\n{}", analysis);
|
||||
}
|
||||
if let Some(analysis) =
|
||||
Analysis::min_squares_iqr(&batch.results, BenchmarkSelector::Reads)
|
||||
Analysis::min_squares_iqr(&batch.db_results, BenchmarkSelector::Reads)
|
||||
{
|
||||
println!("Reads = {:?}", analysis);
|
||||
}
|
||||
if let Some(analysis) =
|
||||
Analysis::min_squares_iqr(&batch.results, BenchmarkSelector::Writes)
|
||||
Analysis::min_squares_iqr(&batch.db_results, BenchmarkSelector::Writes)
|
||||
{
|
||||
println!("Writes = {:?}", analysis);
|
||||
}
|
||||
@@ -335,39 +464,9 @@ impl CliConfiguration for BenchmarkCmd {
|
||||
}
|
||||
|
||||
/// List the benchmarks available in the runtime, in a CSV friendly format.
|
||||
///
|
||||
/// If `pallet_input` and `extrinsic_input` is empty, we list everything.
|
||||
///
|
||||
/// If `pallet_input` is present, we only list the benchmarks for that pallet.
|
||||
///
|
||||
/// If `extrinsic_input` is `*`, we will hide the individual benchmarks for each pallet, and just
|
||||
/// show a single line for each available pallet.
|
||||
fn list_benchmark(pallet_input: &[u8], extrinsic_input: &[u8], list: Vec<BenchmarkList>) {
|
||||
let filtered_list = list
|
||||
.into_iter()
|
||||
.filter(|item| pallet_input.is_empty() || pallet_input == &item.pallet)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
if filtered_list.is_empty() {
|
||||
println!("Pallet not found.");
|
||||
return
|
||||
}
|
||||
|
||||
fn list_benchmark(benchmarks_to_run: Vec<(Vec<u8>, Vec<u8>, Vec<(BenchmarkParameter, u32, u32)>)>) {
|
||||
println!("pallet, benchmark");
|
||||
for item in filtered_list {
|
||||
let pallet_string =
|
||||
String::from_utf8(item.pallet.clone()).expect("Encoded from String; qed");
|
||||
|
||||
if extrinsic_input == &b"*"[..] {
|
||||
println!("{}, *", pallet_string)
|
||||
} else {
|
||||
for benchmark in item.benchmarks {
|
||||
println!(
|
||||
"{}, {}",
|
||||
pallet_string,
|
||||
String::from_utf8(benchmark).expect("Encoded from String; qed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
for (pallet, extrinsic, _components) in benchmarks_to_run {
|
||||
println!("{}, {}", String::from_utf8_lossy(&pallet), String::from_utf8_lossy(&extrinsic));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,10 +50,16 @@ pub struct BenchmarkCmd {
|
||||
#[structopt(long = "high", use_delimiter = true)]
|
||||
pub highest_range_values: Vec<u32>,
|
||||
|
||||
/// Select how many repetitions of this benchmark should run.
|
||||
/// Select how many repetitions of this benchmark should run from within the wasm.
|
||||
#[structopt(short, long, default_value = "1")]
|
||||
pub repeat: u32,
|
||||
|
||||
/// Select how many repetitions of this benchmark should run from the client.
|
||||
///
|
||||
/// NOTE: Using this alone may give slower results, but will afford you maximum Wasm memory.
|
||||
#[structopt(long, default_value = "1")]
|
||||
pub external_repeat: u32,
|
||||
|
||||
/// Print the raw results.
|
||||
#[structopt(long = "raw")]
|
||||
pub raw_data: bool,
|
||||
@@ -130,11 +136,9 @@ pub struct BenchmarkCmd {
|
||||
#[structopt(long = "db-cache", value_name = "MiB", default_value = "128")]
|
||||
pub database_cache_size: u32,
|
||||
|
||||
/// List the benchmarks available.
|
||||
/// List the benchmarks that match your query rather than running them.
|
||||
///
|
||||
/// * If nothing else is specified, all pallets and benchmarks will be listed.
|
||||
/// * If the `pallet` argument is passed, then we will only list benchmarks for that pallet.
|
||||
/// * If the `extrinsic` argument is set to `*`, we will hide the individual benchmarks.
|
||||
/// When nothing is provided, we list all benchmarks.
|
||||
#[structopt(long)]
|
||||
pub list: bool,
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ use serde::Serialize;
|
||||
|
||||
use crate::BenchmarkCmd;
|
||||
use frame_benchmarking::{
|
||||
Analysis, AnalysisChoice, BenchmarkBatch, BenchmarkResults, BenchmarkSelector, RegressionModel,
|
||||
Analysis, AnalysisChoice, BenchmarkBatchSplitResults, BenchmarkResults, BenchmarkSelector,
|
||||
RegressionModel,
|
||||
};
|
||||
use frame_support::traits::StorageInfo;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
@@ -114,7 +115,7 @@ fn io_error(s: &str) -> std::io::Error {
|
||||
// p2 -> [b1, b2]
|
||||
// ```
|
||||
fn map_results(
|
||||
batches: &[BenchmarkBatch],
|
||||
batches: &[BenchmarkBatchSplitResults],
|
||||
storage_info: &[StorageInfo],
|
||||
analysis_choice: &AnalysisChoice,
|
||||
) -> Result<HashMap<(String, String), Vec<BenchmarkData>>, std::io::Error> {
|
||||
@@ -129,7 +130,7 @@ fn map_results(
|
||||
let mut batches_iter = batches.iter().peekable();
|
||||
while let Some(batch) = batches_iter.next() {
|
||||
// Skip if there are no results
|
||||
if batch.results.is_empty() {
|
||||
if batch.time_results.is_empty() {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ fn extract_errors(model: &Option<RegressionModel>) -> impl Iterator<Item = u128>
|
||||
|
||||
// Analyze and return the relevant results for a given benchmark.
|
||||
fn get_benchmark_data(
|
||||
batch: &BenchmarkBatch,
|
||||
batch: &BenchmarkBatchSplitResults,
|
||||
storage_info: &[StorageInfo],
|
||||
analysis_choice: &AnalysisChoice,
|
||||
) -> BenchmarkData {
|
||||
@@ -180,11 +181,11 @@ fn get_benchmark_data(
|
||||
AnalysisChoice::Max => Analysis::max,
|
||||
};
|
||||
|
||||
let extrinsic_time = analysis_function(&batch.results, BenchmarkSelector::ExtrinsicTime)
|
||||
let extrinsic_time = analysis_function(&batch.time_results, BenchmarkSelector::ExtrinsicTime)
|
||||
.expect("analysis function should return an extrinsic time for valid inputs");
|
||||
let reads = analysis_function(&batch.results, BenchmarkSelector::Reads)
|
||||
let reads = analysis_function(&batch.db_results, BenchmarkSelector::Reads)
|
||||
.expect("analysis function should return the number of reads for valid inputs");
|
||||
let writes = analysis_function(&batch.results, BenchmarkSelector::Writes)
|
||||
let writes = analysis_function(&batch.db_results, BenchmarkSelector::Writes)
|
||||
.expect("analysis function should return the number of writes for valid inputs");
|
||||
|
||||
// Analysis data may include components that are not used, this filters out anything whose value is zero.
|
||||
@@ -238,7 +239,7 @@ fn get_benchmark_data(
|
||||
});
|
||||
|
||||
// This puts a marker on any component which is entirely unused in the weight formula.
|
||||
let components = batch.results[0]
|
||||
let components = batch.time_results[0]
|
||||
.components
|
||||
.iter()
|
||||
.map(|(name, _)| -> Component {
|
||||
@@ -249,7 +250,7 @@ fn get_benchmark_data(
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// We add additional comments showing which storage items were touched.
|
||||
add_storage_comments(&mut comments, &batch.results, storage_info);
|
||||
add_storage_comments(&mut comments, &batch.db_results, storage_info);
|
||||
|
||||
BenchmarkData {
|
||||
name: String::from_utf8(batch.benchmark.clone()).unwrap(),
|
||||
@@ -266,7 +267,7 @@ fn get_benchmark_data(
|
||||
|
||||
// Create weight file from benchmark data and Handlebars template.
|
||||
pub fn write_results(
|
||||
batches: &[BenchmarkBatch],
|
||||
batches: &[BenchmarkBatchSplitResults],
|
||||
storage_info: &[StorageInfo],
|
||||
path: &PathBuf,
|
||||
cmd: &BenchmarkCmd,
|
||||
@@ -360,10 +361,21 @@ fn add_storage_comments(
|
||||
results: &[BenchmarkResults],
|
||||
storage_info: &[StorageInfo],
|
||||
) {
|
||||
let storage_info_map = storage_info
|
||||
let mut storage_info_map = storage_info
|
||||
.iter()
|
||||
.map(|info| (info.prefix.clone(), info))
|
||||
.collect::<HashMap<_, _>>();
|
||||
|
||||
// Special hack to show `Skipped Metadata`
|
||||
let skip_storage_info = StorageInfo {
|
||||
pallet_name: b"Skipped".to_vec(),
|
||||
storage_name: b"Metadata".to_vec(),
|
||||
prefix: b"Skipped Metadata".to_vec(),
|
||||
max_values: None,
|
||||
max_size: None,
|
||||
};
|
||||
storage_info_map.insert(skip_storage_info.prefix.clone(), &skip_storage_info);
|
||||
|
||||
// This tracks the keys we already identified, so we only generate a single comment.
|
||||
let mut identified = HashSet::<Vec<u8>>::new();
|
||||
|
||||
@@ -489,7 +501,7 @@ where
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use frame_benchmarking::{BenchmarkBatch, BenchmarkParameter, BenchmarkResults};
|
||||
use frame_benchmarking::{BenchmarkBatchSplitResults, BenchmarkParameter, BenchmarkResults};
|
||||
|
||||
fn test_data(
|
||||
pallet: &[u8],
|
||||
@@ -497,7 +509,7 @@ mod test {
|
||||
param: BenchmarkParameter,
|
||||
base: u32,
|
||||
slope: u32,
|
||||
) -> BenchmarkBatch {
|
||||
) -> BenchmarkBatchSplitResults {
|
||||
let mut results = Vec::new();
|
||||
for i in 0..5 {
|
||||
results.push(BenchmarkResults {
|
||||
@@ -513,11 +525,12 @@ mod test {
|
||||
})
|
||||
}
|
||||
|
||||
return BenchmarkBatch {
|
||||
return BenchmarkBatchSplitResults {
|
||||
pallet: [pallet.to_vec(), b"_pallet".to_vec()].concat(),
|
||||
instance: b"instance".to_vec(),
|
||||
benchmark: [benchmark.to_vec(), b"_benchmark".to_vec()].concat(),
|
||||
results,
|
||||
time_results: results.clone(),
|
||||
db_results: results,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user