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
Implement benchmark and add weights for prediction market pallet #82
Merged
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
sea212
force-pushed
the
sea-benchmark-pm-weights
branch
from
April 21, 2021 18:50
dc93ddc
to
cc2077f
Compare
This commit also fixed recently broken benchmark builds by adding new dependencies to the runtime-benchmarks attribute in runtime crate. It also updates serde to a more recent version.
This commit also changes the crate author to Zeitgeist PM
sea212
force-pushed
the
sea-benchmark-pm-weights
branch
from
April 28, 2021 09:29
b119fb4
to
ab588f4
Compare
sea212
changed the title
[WIP] Implement benchmark and add weights for prediction market pallet
Implement benchmark and add weights for prediction market pallet
Apr 28, 2021
I'll squash everything into 1 commit and rebase into main once it's approved |
lsaether
reviewed
Apr 28, 2021
lsaether
reviewed
Apr 28, 2021
lsaether
reviewed
Apr 28, 2021
easier to parse putting the amount first Co-authored-by: Logan Saether <lsaether@protonmail.com>
Co-authored-by: Logan Saether <lsaether@protonmail.com>
fixed typos Co-authored-by: Logan Saether <lsaether@protonmail.com>
c410-f3r
reviewed
Apr 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sea212, thanks for the PR!
Taking aside the cargo test
stuff, everything else looks good IMO.
Applies to prediction markets pallet and swaps pallet
…tgeist into sea-benchmark-pm-weights
c410-f3r
approved these changes
Apr 28, 2021
lsaether
reviewed
Apr 29, 2021
lsaether
approved these changes
Apr 29, 2021
c410-f3r
pushed a commit
to c410-f3r/zeitgeist
that referenced
this pull request
Sep 14, 2021
…tgeistpm#82) * Create benchmark scaffold for pallet prediction-markets This commit also fixed recently broken benchmark builds by adding new dependencies to the runtime-benchmarks attribute in runtime crate. It also updates serde to a more recent version. * Fix uncompilable benchmarks introduced in zeitgeistpm#76 This commit also changes the crate author to Zeitgeist PM * Add benchmark: create_categorical_market * Add weight: create_categorical_market * Add benchmark: create_scalar_market * Add weight: create_scalar_market * Add benchmark: approve_market * Add weight: approve_market * Add benchmark: reject_market * Add weight: reject_market * Add benchmark: admin_destroy_market * Add weight: admin_destroy_market * Add benchmark: cancel_pending_market * Add weight: cancel_pending_market * Add benchmark: buy_complete_set * Add weights & additional buy_complete_set benchmark * Merge two buy_complete_set benchmarks into one * Add benchmark: admin_move_market_to_closed * Add weight: admin_move_market_to_closed * Add benchmark: sell_complete_set * Add weight: sell_complete_set * Add benchmark: report * Add weight: report * Add benchmark: dispute * Add weight: dispute * Add benchmark: deploy_swap_pool_for_market * Add weight: deploy_swap_pool_for_market * Add benchmark: admin_destroy_reported_market * Add benchmarks for admin_destroy_market * Improve admin_destroy_market benchmark precision * Add weight: admin_destroy_market * Improve admin_destroy_market benchmark The improvements will carry over to other functions that resolve markets, like in on_finalize * Add benchmark: on_initialize * Add weight: on_initialize This commit also introduces an extensive benchmark of the internal_resolve function for different market types * Add benchmark: admin_move_market_to_resolved * Add weight: admin_move_market_to_resolved * Add benchmark & weight: redeem_shares * Cleanup * Update primitives/src/lib.rs easier to parse putting the amount first Co-authored-by: Logan Saether <lsaether@protonmail.com> * Update zrml/prediction-markets/src/lib.rs Co-authored-by: Logan Saether <lsaether@protonmail.com> * Update zrml/prediction-markets/src/lib.rs fixed typos Co-authored-by: Logan Saether <lsaether@protonmail.com> * Fix failing benchmark tests Applies to prediction markets pallet and swaps pallet * Cargo fmt * Integrate orml-currency into swaps mock * Add comment about account number Co-authored-by: Logan Saether <lsaether@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue: #7
Solution: Implement benchmarks and add weights for every dispatchable function in the prediction market pallet.
Progress:
Benchmarks
Weights