Skip to content

Benchmark invoice lifecycle resource usage with baselines and thresholds - #1005

Merged
levoski1 merged 1 commit into
WHEELBACK:mainfrom
maxiafolabii:drips/958
Oct 21, 2026
Merged

levoski1 merged 1 commit into
WHEELBACK:mainfrom
maxiafolabii:drips/958

Conversation

@maxiafolabii

Copy link
Copy Markdown
Contributor

Summary

Benchmark invoice lifecycle resource usage with baselines and thresholds

What was solved

#958 — Benchmark the full invoice lifecycle

Add reproducible benchmarks covering the full invoice lifecycle (creation, payment, cancellation, refund, settlement) and publish baseline results with regression thresholds. The treasury contract already has a benchmark module and settlement resource baselines, so the focused contribution is to extend that benchmark surface to the invoice lifecycle and record baseline resource files plus thresholds that CI can compare against.

Addressed:

  • Changed: COMEBACKHERE-contracts/contracts/treasury/src/benchmark.rs, COMEBACKHERE-contracts/contracts/treasury/resources/execute_settlement_baseline.json
  • Benchmark invoice creation, payment, cancellation, refund, and settlement resource usage
  • Publish reproducible benchmark results (baseline resource JSON artifacts)
  • Define thresholds that catch material regressions against the baselines

Changes

  • COMEBACKHERE-contracts/contracts/treasury/resources/execute_settlement_baseline.json (modify)
  • COMEBACKHERE-contracts/contracts/treasury/src/benchmark.rs (modify)

Approach

  1. Inspect the existing treasury benchmark module and resources/ baseline JSON to mirror its structure and naming conventions.
  2. Extend the treasury benchmark module (or add an invoice benchmark module following the same pattern) to measure invoice creation, payment, cancellation, refund, and settlement resource usage.
  3. Add baseline resource JSON artifacts under the appropriate resources/ directory for each invoice lifecycle operation.
  4. Define regression thresholds (e.g., percentage tolerance) alongside the baselines so CI can compare measured usage against them.
  5. Wire the invoice lifecycle benchmarks into the existing benchmark entry points without altering production contract logic.
  6. Verify the invoice test file references the new benchmark surface only where needed, keeping changes surgical.

Issues

Closes #958

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@maxiafolabii 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

@levoski1
levoski1 merged commit 0b2e4f6 into WHEELBACK:main Oct 21, 2026
0 of 11 checks passed
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.

Benchmark the full invoice lifecycle

2 participants