Measure per byte and not kb for certain benchmarks (#10863)

This commit is contained in:
Alexander Theißen
2022-02-16 11:49:31 +01:00
committed by GitHub
parent 6b7eb2e2d7
commit 1a744befd4
5 changed files with 667 additions and 670 deletions
@@ -216,9 +216,9 @@ impl<T: Config> Token<T> for CodeToken {
// point because when charging the general weight for calling the contract we not know the
// size of the contract.
match *self {
Reinstrument(len) => T::WeightInfo::reinstrument(len / 1024),
Load(len) => T::WeightInfo::call_with_code_kb(len / 1024)
.saturating_sub(T::WeightInfo::call_with_code_kb(0)),
Reinstrument(len) => T::WeightInfo::reinstrument(len),
Load(len) => T::WeightInfo::call_with_code_per_byte(len)
.saturating_sub(T::WeightInfo::call_with_code_per_byte(0)),
}
}
}