-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(benchmarking): tune benchmarking for non-return syscalls #3319
Merged
breathx
merged 9 commits into
master
from
tltsutltsu/tune-benchmarking-for-non-return-syscalls
Sep 26, 2023
Merged
feat(benchmarking): tune benchmarking for non-return syscalls #3319
breathx
merged 9 commits into
master
from
tltsutltsu/tune-benchmarking-for-non-return-syscalls
Sep 26, 2023
Conversation
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
tltsutltsu
added
A1-inprogress
Issue is in progress or PR draft is not ready to be reviewed
D6-gas
Change gas charging logic or weights
labels
Sep 21, 2023
tltsutltsu
changed the title
Tune benchmarking for non-return syscalls
feat(benchmarking): tune benchmarking for non-return syscalls
Sep 21, 2023
tltsutltsu
added
A0-pleasereview
PR is ready to be reviewed by the team
and removed
A1-inprogress
Issue is in progress or PR draft is not ready to be reviewed
labels
Sep 22, 2023
Could you post a table here with the weight changes? |
…nto tltsutltsu/tune-benchmarking-for-non-return-syscalls
Sure!
These weights were measured with 1000 repeats. |
ukint-vs
approved these changes
Sep 22, 2023
breathx
approved these changes
Sep 26, 2023
breathx
deleted the
tltsutltsu/tune-benchmarking-for-non-return-syscalls
branch
September 26, 2023 12:54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Resolves: #2938
There are a couple of benchmarks preceded with this comment:
Lets call them "one-time benchmarks"
This PR resolves this problem by splitting the benchmarking process of
pallet_gear
into two runs. The first run is made with default parameters (--steps=20
,--repeat=50
) for all extrinsics, excluding one-time ones. The second run is made only for one-time extrinsics, with--steps=2
,--repeat=1000
params. This allows to evaluate one-time benchmarks more thoroughly.Here's how it's done, technically:
run_all_benchmarks.sh
obtains a list of all extrinsics.run_all_benchmarks.sh
runs all benchmarks, excluding one-time ones. The output is written into thepallet_gear.rs
file.run_all_benchmarks.sh
runs only one-time benchmarks. The output is written into thepallet_gear_onetime.rs
file.merge-outputs.sh
movesWeightInfo
trait definitions and weights from thepallet_gear_onetime.rs
file to mainpallet_gear.rs
file.No changes needed in CI, and everything, including weights unpacking script, is are already working fine.
Successful benchmark action run / Weights diff table
The set of these one-time benchmarks can be changed anytime without need of modifying the logic in the script. Additionally ,
merge-outputs.sh
also allows to merge more than one file by specifying multiple files.@gear-tech/dev