You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a developer who has invested in significant test coverage, they should be able to, through the execution of those tests, get a good signal for the costs their contract is expected require.
What would you like to see?
An option when running tests, maybe enabled by default if there is no significant performance issue with having it enabled, where a summary of every contract function that was executed along with it's range of costs.
An option for a detailed view where costs are shown per test.
What alternatives are there?
Developers can get this themselves on each test, but it's difficult to get that broad overview.
Caveat
The budget in the unit tests is not as accurate to when txs are submitted, and this issue is probably of very low impact unless that accuracy is improved in the Soroban Env when simulating in tests.
The text was updated successfully, but these errors were encountered:
leighmcculloch
changed the title
Add automated gas reports
Add automated resource cost reports
Aug 16, 2024
… 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)
What problem does your feature solve?
For a developer who has invested in significant test coverage, they should be able to, through the execution of those tests, get a good signal for the costs their contract is expected require.
What would you like to see?
An option when running tests, maybe enabled by default if there is no significant performance issue with having it enabled, where a summary of every contract function that was executed along with it's range of costs.
An option for a detailed view where costs are shown per test.
What alternatives are there?
Developers can get this themselves on each test, but it's difficult to get that broad overview.
Caveat
The budget in the unit tests is not as accurate to when txs are submitted, and this issue is probably of very low impact unless that accuracy is improved in the Soroban Env when simulating in tests.
The text was updated successfully, but these errors were encountered: