Skip to content

Commit

Permalink
Prettify weight printing
Browse files Browse the repository at this point in the history
  • Loading branch information
aborg-dev committed Feb 3, 2023
1 parent d574064 commit 9cb4c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/primitives/res/runtime_configs/parameters.snap
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ wasm_storage_iter_create_to_byte 0
wasm_storage_iter_next_base 0
wasm_storage_iter_next_key_byte 0
wasm_storage_iter_next_value_byte 0
wasm_touching_trie_node 16_101_955_926
wasm_touching_trie_node 16_101_955_926, weight: 2 / 3
wasm_read_cached_trie_node 2_280_000_000
wasm_promise_and_base 1_465_013_400
wasm_promise_and_per_promise 5_452_176
Expand Down
6 changes: 2 additions & 4 deletions core/primitives/src/runtime/parameter_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,9 @@ impl core::fmt::Display for ParameterValue {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
match self {
ParameterValue::U64(v) => write!(f, "{:>20}", format_number(*v)),
ParameterValue::Rational(r) => {
write!(f, "{r}")
}
ParameterValue::Rational(r) => write!(f, "{r}"),
ParameterValue::WeightedGas { base, weight } => {
write!(f, "base: {base}, weight: {weight}")
write!(f, "{:>20}, weight: {weight}", format_number(*base))
}
ParameterValue::Fee { send_sir, send_not_sir, execution } => {
write!(
Expand Down

0 comments on commit 9cb4c7b

Please sign in to comment.