Weight v1.5 Follow Ups (#12155)

* update api

* update

* remove unused

* remove `one` api

* fix unused

* fmt

* add saturating accrue

* remove `Weight::new()`

* use some macros

* div makes no sense

* Update weight_v2.rs

* missed some

* more patch

* fixes

* more fixes

* more fix

* more fix

* Update frame/support/src/weights/weight_v2.rs

* not needed

* fix weight file
This commit is contained in:
Shawn Tabrizi
2022-09-01 18:48:03 +01:00
committed by GitHub
parent 6be21e0397
commit 1df4561676
80 changed files with 965 additions and 960 deletions
+12 -12
View File
@@ -92,11 +92,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
// Standard Error: 375_000
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
@@ -188,9 +188,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn set_metadata(n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(32_395_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
@@ -206,7 +206,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(19_586_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
@@ -277,11 +277,11 @@ impl WeightInfo for () {
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
// Standard Error: 375_000
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
@@ -373,9 +373,9 @@ impl WeightInfo for () {
fn set_metadata(n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(32_395_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
@@ -391,7 +391,7 @@ impl WeightInfo for () {
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(19_586_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}