-
Notifications
You must be signed in to change notification settings - Fork 19
Benchmarking
In order to achieve a certain block time, for example 6 seconds per block, there is a limited number of lines of code can be run during that time frame. When writing a pallet function, the developer is responsible for calculating its computational complexity, which is called weight. The process of determining that complexity, or simply put, time cost is called benchmarking.
- Benchmarks are run again for each Release using Option 2: "Referenced Hardware"
- Release benchmarks are not merged back into
main
- Benchmarks should still be run on your branches as needed so that PRs highlight changes in weights
There are 2 options to run benchmarks:
- Locally on a developer laptop
- Remotely on referenced hardware in the cloud
❗ DO NOT commit weights yourself!
make benchmarks
It can be helpful to temporarily lower the number of iterations when testing benchmarks locally to decrease the time it takes to run them.
Coming soon...
❗ DO NOT commit weights yourself! They will be auto-committed by CI job upon completion.
To trigger running benchmarks on reference hardware in the cloud:
- Open a PR and ensure that it is up to date with
main
and ready for merging. - Request a core developer to run benchmarks.
- Core developer will go to Jenkins (VPN Required) and kick off the build for that PR
- Upon job completion, the updated weights will be committed back to the PR branch in a new commit.