Repository navigation
chore: benchmark EMA reciprocal averaging path - #1553
Merged
Merged
Conversation
Weight Diff Report
14 extrinsic(s) changed across 1 pallet(s). New: 0. Removed: 0. pallet_ema_oracle
Threshold: ±10%. Base |
|
Crate versions that have been updated:
Runtime version has been increased. |
enthusiastmartin
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The direction-independent EMA change added a reciprocal averaging branch, but the existing benchmark fixtures fed equal prices and measured only the legacy path. This follow-up makes
on_finalize_multiple_tokensand staleget_entryexercise a rising price, so generated weights cover the more expensive branch.It regenerates the EMA weights, bumps the runtime to 455, fixes the dispatched benchmark workflow master fetch, and makes the benchmark skip marker evaluate the checked-out commit and skip all expensive steps.
Benchmark impact:
get_entry: 34.424 -> 39.327 us compute (+14.2%); 84.424 -> 89.327 us including two database reads (+5.8%).on_finalize_multiple_tokens: per-pair compute slope 58.095 -> 68.346 us (+17.6%); including four reads and four writes per pair, total charged weight increases by about 1.8-2.3%.Validation:
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" SKIP_WASM_BUILD=1 cargo check -p hydradx-runtime --features runtime-benchmarksRUSTFLAGS="-D warnings" SKIP_WASM_BUILD=1 cargo test -p hydradx-runtime --features runtime-benchmarks benchmarking::ema_oracle --libmake checkwith the generated weights