Constant Weight Signature in Benchmarking CLI (#7233)

* Don't remove unused components

* add more metadata to generated file

* unused code

* proposed format

* Revert "proposed format"

This reverts commit ce522c3480157ab6670bcbd9b17e1398168cabf4.

* Update weight signatures and unused components in benchmarks

* Keep timestamp constant time

* remove component from as_derivative
This commit is contained in:
Shawn Tabrizi
2020-10-17 14:35:15 +02:00
committed by GitHub
parent 158fdecc0b
commit 13be04e0a7
16 changed files with 47 additions and 69 deletions
+2 -3
View File
@@ -50,13 +50,12 @@ benchmarks! {
}
as_derivative {
let u in 0 .. 1000;
let caller = account("caller", u, SEED);
let caller = account("caller", SEED, SEED);
let call = Box::new(frame_system::Call::remark(vec![]).into());
// Whitelist caller account from further DB operations.
let caller_key = frame_system::Account::<T>::hashed_key_for(&caller);
frame_benchmarking::benchmarking::add_to_whitelist(caller_key.into());
}: _(RawOrigin::Signed(caller), u as u16, call)
}: _(RawOrigin::Signed(caller), SEED as u16, call)
}
#[cfg(test)]
@@ -27,7 +27,6 @@ impl crate::WeightInfo for () {
(16461000 as Weight)
.saturating_add((1982000 as Weight).saturating_mul(c as Weight))
}
// WARNING! Some components were not used: ["u"]
fn as_derivative() -> Weight {
(4086000 as Weight)
}