Repository navigation
feat(bench): add Soroban instruction and memory budget regression benchmarks (#23) - #762
Open
huangji6693-max wants to merge 1 commit into
Open
huangji6693-max wants to merge 1 commit into
huangji6693-max wants to merge 1 commit into
Conversation
…chmarks (MergeFi#23) Add Soroban CPU instruction and memory byte resource-budget benchmarks across mergefi-escrow, mergefi-milestones, and mergefi-maintenance-pool using env.cost_estimate().budget(). - Cover all public entrypoints across all three contracts. - Add size-parameterized scaling curves for release/release_issue/withdraw recipient counts (1, 5, 10, 20), refund/cancel_milestone contributor counts (1, 5, 10, 20), milestone allocations map growth (1, 10, 25, 50), and maintenance-pool deposit_count growth (1, 10, 25, 50). - Enforce a 150% baseline regression tolerance ceiling and Soroban mainnet per-invocation limits (100M CPU instructions, 40 MiB memory). - Add make bench target to Makefile and document baseline tables and scaling analysis in BENCHMARKS.md and README.md. Closes MergeFi#23
|
@huangji6693-max is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
cpu_instruction_cost) and memory byte (memory_bytes_cost) benchmark modules incontracts/escrow/src/bench.rs,contracts/milestones/src/bench.rs, andcontracts/maintenance-pool/src/bench.rsusingenv.cost_estimate().budget().mergefi-escrow,mergefi-milestones, andmergefi-maintenance-pool.N:release,release_issue, andwithdrawby recipient count (1, 5, 10, 20).refundandcancel_milestoneby contributor count (1, 5, 10, 20).allocateandrelease_issueby prior allocation count inMilestone.allocations(1, 10, 25, 50).deposit,keep_alive,withdraw, andreclaim_depositbydeposit_count(1, 10, 25, 50).100,000,000CPU instructions,41,943,040memory bytes).make benchtarget toMakefileand document baseline tables and scaling analysis inBENCHMARKS.mdandREADME.md.Verification
make bench(cargo test --workspace bench_ -- --nocapture --test-threads=1) — all 3 contract benchmark suites pass.cargo clippy --workspace --lib --locked -- -D warnings— 0 warnings.RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items— 0 warnings.Closes #23