-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor property writing + dev mode enhancements #1000
Conversation
5c37987
to
d2c9363
Compare
// Measured: `667` | ||
// Estimated: `4325` | ||
// Minimum execution time: 7_344_000 picoseconds. | ||
Weight::from_parts(7_578_000, 4325) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хм, интересно почему. У нас для поиска читалась какая-то большая информация для токенов, которая однако погружалась в коде инициализации бенчмарка? Да вроде не похоже...
@@ -52,10 +52,10 @@ pub const MAX_COLLATORS: u32 = 10; | |||
pub const SESSION_LENGTH: BlockNumber = HOURS; | |||
|
|||
// Targeting 0.1 UNQ per transfer | |||
pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/76_840_511_488_584_762/*</weight2fee>*/; | |||
pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/77_334_604_063_436_322/*</weight2fee>*/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Изменение во втором и третьем знаке! 🎉
@@ -90,7 +90,7 @@ evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken Contr | |||
|
|||
.PHONY: _bench | |||
_bench: | |||
cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \ | |||
cargo run --profile production --features runtime-benchmarks,$(RUNTIME) -- \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я подумал, а зачем мы вообще это кучу раз компилируем...
У нас там перед каждым бенчмарком палеты ноду снова пересобирает, и я только что понял что она пересобирает - у нас изменяется weights.rs, и оно собирает ноду с новыми весами.
По идее тут нужно один раз ноду собрать, и потом вызывать ./unique-collator benchmark ...
Что тут однако не выйдет сделать, поскольку у нас рекурсивный make.
Сейчас unactionable, но способ оптимизации ясен.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ещё один нитпик и можно принимать
pub fn has_value(&self) -> bool { | ||
self.value.is_some() | ||
} | ||
|
||
fn compute_value_if_not_already(&mut self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Длинно и не так понятно)
Может force()
назвать, как в FP принято?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мб force_value()
тогда?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно
nesting_budget, | ||
)?; | ||
|
||
Ok(is_bundle_owner) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok(is_bundle_owner) | |
<PalletStructure<T>>::check_indirectly_owned( | |
maybe_owner.clone(), | |
self.id, | |
token, | |
None, | |
nesting_budget, | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(clippy на это жалуется)
No description provided.