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

This commit is contained in:
Alexander Theißen authored and GitHub committed 2022-02-16 10:49:31 +00:00
1 parent 6b7eb2e2d7
commit 1a744befd4
5 files changed
+667 -670

No files matched your search

@@ -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)),
}
}
}