-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test-only mechanism for metering most of the relevant resources…
… per-invocation (#1482) ### What This is an opt-in feature that will reset the budget and take a storage snapshot for every 'logical' invocation (such as `call` or a lifecycle operation). Then when the invocation is done we use the snapshot and current budget to produce the estimate for the resources consumed by the invocation (budget-related, IO-related and rent bumps). This also provides a rough estimation for the respective fee breakdown given a fee config. ### Why Make unit tests more useful for rough performance evaluation. This is the initial env-side implementation for stellar/rs-soroban-sdk#1319 ### Known limitations Some of the resources are tricky to model. Specifically, this omits: - transaction size - return value size - some XDR roundtrips that always happen for production scenarios These shouldn't be too significant though and are likely better addressed via e2e runs (like simulation or some `e2e_invoke`-based mechanism)
- Loading branch information
Showing
11 changed files
with
834 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.