Add comprehensive benchmarks for storage access#7583
Conversation
PR SummaryLow Risk Overview Introduces two benchmark contracts: Includes a Written by Cursor Bugbot for commit 97f3a23. This will update automatically on new commits. Configure here. |
|
👍 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Wrong package name in stored_types Forc.lock
- Updated
stored_types/Forc.lockto correctly declare only thestored_typesmember package with nostddependency, matching itsForc.tomlconfiguration.
- Updated
Or push these changes by commenting:
@cursor push 60890ab004
Preview (60890ab004)
diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/storage_benchmarks/stored_types/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/storage_benchmarks/stored_types/Forc.lock
--- a/test/src/e2e_vm_tests/test_programs/should_pass/storage_benchmarks/stored_types/Forc.lock
+++ b/test/src/e2e_vm_tests/test_programs/should_pass/storage_benchmarks/stored_types/Forc.lock
@@ -1,8 +1,3 @@
[[package]]
-name = "std"
-source = "path+from-root-90F1067CD9AC8A94"
-
-[[package]]
-name = "storage_slot_key_calculation"
+name = "stored_types"
source = "member"
-dependencies = ["std"]This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
## Description This PR is a continuation of #7583. It adds additional benchmarks for benchmarking all `StorageVec` API methods for different element sizes and different number of elements stored. The `README.md` explains the benchmarks and how to use the benchmarking infrastructure. The `RESULTS.md` contains the benchmarking results for the current `storage` implementation. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.


Description
This PR adds comprehensive benchmarks for storage fields access. We want to have the benchmark and historical values collected, in order to be able to compare them with the storage access costs after #7560 is implemented.
The
README.mdexplains the benchmarks and how to use the benchmarking infrastructure.The
RESULTS.mdcontains the benchmarking results for the currentstorageimplementation.The storage opcode costs are based on values in the
gas_costs_values.jsonand are taken from thechain-configurationrepository's Ignition consensus parameter 6.The benchmarks for
StorageVecoperations will be added in a follow up PR.Checklist
Breaking*orNew Featurelabels where relevant.