Skip to content

Conversation

@zjb0807
Copy link
Member

@zjb0807 zjb0807 commented Dec 1, 2025

nutsfinance/stable-asset#60

Closes: #2793
Closes: #2766

  • add pallet_xcm benchmarks

@zjb0807 zjb0807 requested a review from xlc December 1, 2025 00:58
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found multiple instances of a typo where Liner is used instead of Linear in benchmarking definitions across several modules. Also noted that pallet_xcm benchmarks are commented out in the runtime configuration, which contradicts the PR description implying they should be added.


Suggestions that couldn't be attached to a specific line

modules/evm/src/benchmarking.rs:324

Typo: Liner should be Linear.


modules/homa/src/benchmarking.rs:37

Typo: Liner should be Linear.


modules/homa/src/benchmarking.rs:139

Typo: Liner should be Linear.


modules/homa/src/benchmarking.rs:228

Typo: Liner should be Linear.


modules/incentives/src/benchmarking.rs:123

Typo: Liner should be Linear.


runtime/mandala/src/lib.rs:2269

The pallet_xcm benchmarks are commented out here and in the dispatch_benchmark implementation (lines 2650-2711 in the diff context), but the PR description mentions adding them. Please confirm if this is intentional.

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 26.70807% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.86%. Comparing base (152f444) to head (cc7dad8).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
modules/evm/src/benchmarking.rs 0.00% 25 Missing ⚠️
modules/dex/src/benchmarking.rs 0.00% 24 Missing ⚠️
modules/collator-selection/src/benchmarking.rs 0.00% 13 Missing ⚠️
modules/cdp-engine/src/benchmarking.rs 0.00% 10 Missing ⚠️
modules/honzon/src/benchmarking.rs 0.00% 8 Missing ⚠️
modules/earning/src/benchmarking.rs 0.00% 6 Missing ⚠️
modules/transaction-payment/src/benchmarking.rs 0.00% 6 Missing ⚠️
modules/nft/src/benchmarking.rs 0.00% 5 Missing ⚠️
modules/aggregated-dex/src/benchmarking.rs 0.00% 4 Missing ⚠️
modules/currencies/src/benchmarking.rs 0.00% 4 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2947      +/-   ##
==========================================
- Coverage   48.43%   47.86%   -0.57%     
==========================================
  Files          69       83      +14     
  Lines        9454     9566     +112     
==========================================
  Hits         4579     4579              
- Misses       4875     4987     +112     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

The PR successfully migrates benchmarks to frame-benchmarking v2 and reorganizes them into their respective modules, improving modularity. The runtime integration uses a shared benchmark_common.rs to handle common setup. A few specific issues regarding external dependencies and storage usage assumptions were found.


Review Suggestions

runtime/mandala/src/benchmark_common.rs:1105

The use of include_str!("../../../ts-tests/build/Erc20DemoContract2.json") creates a dependency on build artifacts from ts-tests. Ensure that these artifacts are always available when running benchmarks, or consider committing the JSON file or generating it within the Rust build process to avoid build failures in clean environments.


modules/evm/src/tests.rs:281, 355, 631

Storage usage values have increased significantly (approx +9900) across multiple tests. Verify that this increase is expected and intentional (e.g., due to dependency updates or configuration changes).


modules/dex/src/benchmarking.rs:42

The dollar function hardcodes 12 decimals (10u128.saturating_pow(12)). While likely correct for Acala/Karura, ensure this assumption holds for all runtimes using this module or consider retrieving it from configuration.

@xlc xlc merged commit 5e909e1 into master Dec 3, 2025
7 checks passed
@xlc xlc deleted the add-benchmarks branch December 3, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add oracle benchmarks back using benchmarking code in the ORML repo migrate all of the benchmarks with frame-benchmarking

3 participants