Skip to content

feat: add resource benchmark for propose - #317

Open
Buchi-Einstein wants to merge 1 commit into
WHEELBACK:mainfrom
Buchi-Einstein:feature/add-benchmark-for-settlement-propose-resource-consumption
Open

feat: add resource benchmark for propose#317
Buchi-Einstein wants to merge 1 commit into
WHEELBACK:mainfrom
Buchi-Einstein:feature/add-benchmark-for-settlement-propose-resource-consumption

Conversation

@Buchi-Einstein

Copy link
Copy Markdown

Description

Add a resource consumption benchmark for propose_settlement in the treasury contract to track CPU/memory instruction counts and catch resource-cost regressions.

Changes

New benchmark module (COMEBACKHERE-contracts/contracts/treasury/src/benchmark.rs)

  • bench_propose_settlement — measures CPU instructions and memory bytes for a single propose_settlement call, with loose upper-bound assertions
  • bench_propose_settlement_deterministic — verifies that two sequential propose_settlement calls consume the same resources (determinism check)

Baseline snapshot

  • COMEBACKHERE-contracts/contracts/treasury/resources/propose_settlement_baseline.json — committed baseline for future PRs to diff against

Wiring

  • Added mod benchmark; to the treasury contract's test module so the benchmarks run as part of cargo test --workspace

Closes #182

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Buchi-Einstein Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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 benchmark for settlement propose resource consumption

1 participant