-
Notifications
You must be signed in to change notification settings - Fork 105
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
Heuristics tests are altered to panic with multiple results #4252
base: master
Are you sure you want to change the base?
Heuristics tests are altered to panic with multiple results #4252
Conversation
runtime/vara/src/tests.rs
Outdated
pub parachain_read_heuristic: CostOf<GearPagesAmount>, | ||
} | ||
|
||
impl<T: pallet_gear::Config> From<MemoryWeights<T>> for PagesCosts { |
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.
btw we already have gear_core::costs::LazyPagesCosts
. mb reuse it here?
gear/pallets/gear/src/schedule.rs
Line 1304 in 73929e3
impl<T: Config> From<MemoryWeights<T>> for LazyPagesCosts { |
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.
we could add the missing fields (from MemoryWeights<T>
) to gear_core::costs::LazyPagesCosts
and reuse that for both gtest and these checks.
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.
Done
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.
That way LazyPagesCosts become not actually costs of lazy pages. wdyt @grishasobol ?
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.
Do you think we need a more generic name for the structure? @breathx
…-improve-ux-of-runtime-heuristics-tests
…-improve-ux-of-runtime-heuristics-tests
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.
lgtm, Im only aware of naming for lazy pages costs, waiting for additional opinions here
…-improve-ux-of-runtime-heuristics-tests
Resolves #4246