This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
new proc-macro-based benchmarking syntax #12924
Merged
Merged
Changes from all commits
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
159de40
add stub for new benchmark macro
sam0x17 fabc0cd
benchmark syntax
sam0x17 04d652c
add #[extrinsic call] separator
sam0x17 c6c8eae
parse #[benchmark] item as a function
sam0x17 940a1d9
proper emission of error when #[extrinsic_call] annotation is missing
sam0x17 ece2c1d
clean up
sam0x17 7d0a467
enclosing module via benchmarks! { } working
sam0x17 ad8260c
use an attribute macro on the module instead of benchmarks! { }
sam0x17 7ab18a9
cargo fmt
sam0x17 d4efeaf
working component implementation
sam0x17 968a756
WIP
sam0x17 9ae168b
working
sam0x17 d976fbf
add syntax for Linear<A, B>
sam0x17 9fd9dc9
parsing of param ranges (still need to build tuple though)
sam0x17 ca6c377
params parsing WIP
sam0x17 09b1f32
clean up (don't need extrinsic call name)
sam0x17 b767e9f
use proper Result syntax for BenchmarkDef parsing
sam0x17 d36210a
proper parsing of Linear<0, 1> style args
sam0x17 33ac0f7
successfully parse and make use of linear component ranges :boom:
sam0x17 b75410f
rename support variable => home because eventually will be moved
sam0x17 7686c7f
compile-time check that param range types implement ParamRange
sam0x17 061b3fe
switch to using balances as example, failing on instance pallet
sam0x17 883c738
successfully set up __origin and __call with balances :boom:
sam0x17 193f946
clean up
sam0x17 a9784eb
use a module
sam0x17 d3fe8ac
don't need a variable for transfer
sam0x17 deb4157
rename benchmark_transfer -> transfer because no longer conflicts
sam0x17 982429d
clean up
sam0x17 749c7b0
working with transfer_increasing_users as well :boom:
sam0x17 0ef810c
re-add BareBlock
sam0x17 4fe2cd8
add comments for undocumented structs+functions+traits
sam0x17 75297bb
refactor in preparation for removing module requirements
sam0x17 dc12eb2
switch to a block instead of a module
sam0x17 905f901
use the outer macro pattern to to enable #[benchmarks] aggregation
sam0x17 9ae7041
successfully generate SelectedBenchmark :boom:
sam0x17 f989f89
implement components for SelectedBenchmark
sam0x17 2189e0d
implement instance for SelectedBenchmark
sam0x17 c1b3667
properly track #[extra]
sam0x17 cf0a897
working impl for fn benchmarks()
sam0x17 199ae05
run_benchmarks WIP
sam0x17 a7df617
finish run_benchmark! impl :boom:
sam0x17 58aa62e
import balances transfer_best_case benchmark
sam0x17 44bf752
import transfer_keep_alive balances pallet benchmark
sam0x17 fadbc5b
import set_balance_creating balances pallet benchmark
sam0x17 8aad678
import set_balance_killing balances pallet benchmark
sam0x17 316210d
import force_transfer balances pallet benchmark
sam0x17 8218b3f
add #[extra] annotation and docs to transfer_increasing_users
sam0x17 eae9464
import transfer_all balances pallet benchmark
sam0x17 057dc07
import force_unreserve balances pallet benchmark
sam0x17 4f70c52
prepare to implement impl_benchmark_test_suite!
sam0x17 02bf583
ensure tests cover #[extra] before and after #[benchmark] tag
sam0x17 f4c3035
refactor
sam0x17 03c2a7f
clean up
sam0x17 3023e48
fix
sam0x17 90d839f
move to outer
sam0x17 700124e
switch to benchmarks/instance_benchmarks
sam0x17 2371768
test impl almost done, strange compiler error
sam0x17 d9c77e6
benchmark test suites working :boom:
sam0x17 d8fb36a
clean up
sam0x17 63358d8
add stub and basic parsing for where_clause
sam0x17 520d7eb
working except where clause and extrinsic calls containing method chains
sam0x17 1fb5898
assume option (2) for now wrt https://github.com/paritytech/substrate…
sam0x17 9d61cd3
clean up
sam0x17 34b770b
switch to attribute-style
sam0x17 a90a04f
properly handle where clauses
sam0x17 f8525e2
fix subtle missing where clause, now just MessageQueue issues
sam0x17 59ae627
fix block formatting in message-queue pallet
sam0x17 3b76271
switch to block vs non-block parsing of extrinsic call
sam0x17 43e461f
working now but some benchmark tests failing
sam0x17 50fd18a
message-queue tests working (run order issue fixed) :tada:
sam0x17 e279512
add comments and internal docs for fame_support_procedural::benchmark
sam0x17 7f2c3ed
fix license years
sam0x17 73511ed
docs for lib.rs
sam0x17 3b1387c
add docs to new support procedural macros
sam0x17 f318393
don't allow #[benchmark] outside of benchmarking module
sam0x17 b885d62
add docs
sam0x17 f7c7454
use benchmark(extra, skip_meta) style args
sam0x17 2877c2c
update docs accordingly
sam0x17 5df08c9
appease clippy
sam0x17 7802bfd
bump ci
sam0x17 09bd5ee
add notes about `extra` and `skip_meta`
sam0x17 c601966
fix doc tests
sam0x17 7c8af26
re-run CI
sam0x17 4b3707e
use `ignore` instead of `no_run` on doc examples
sam0x17 e6a671f
bump CI
sam0x17 6e808af
replace some if-lets with if-elses
sam0x17 c907eb1
more refactoring of if-let statements
sam0x17 08268b5
fix remaining if-lets in BenchmarkDef::from()
sam0x17 ffa06ea
fix if-lets in benchmarks()
sam0x17 8f3b7b5
fix remaining if-lets, use nested find_map for extrinsic call
sam0x17 7410006
switch to use #[extrinsic_call] or #[block] situationally
sam0x17 f226fc8
refactor ExtrinsicCallDef => BenchmarkCallDef
sam0x17 401eef5
update docs with info about #[block]
sam0x17 1016153
add macro stub for #[extrinsic_call]
sam0x17 47b679a
fix docs and add stub for #[block] as well
sam0x17 dd8fc6f
remove unused extern crate line
sam0x17 fac2217
fix clippy nits
sam0x17 bd229d0
Use V2 bench syntax in pallet-example-basic
ggwpez 91227f8
carry over comment
sam0x17 0443248
use curly-brace style for impl_benchmark_test_suite!
sam0x17 25b9093
remove unneeded parenthesis
sam0x17 82fa413
proper handling of _() extrinsic call style
sam0x17 0a371f5
add docs for _() syntax
sam0x17 67c227d
fix crate access
sam0x17 b8b8d50
simplify keyword access
sam0x17 cff3a2a
simplify module content destructuring
sam0x17 5de75fe
fix crate access "frame_benchmarking" => "frame-benchmarking", compiles
sam0x17 b2a24bd
use _() extrinsic call syntax where possible in balances
sam0x17 c588411
simplify attr.path.segments.last()
sam0x17 d6e29b2
fix compile error being suppressed
sam0x17 48fe1da
simplify extrinsic call keyword parsing
sam0x17 ce71216
use ? operator instead of return None
sam0x17 675f2e8
rename generics => type_use_generics
sam0x17 2171d27
simplify extrinsic call extraction with transpose
sam0x17 37216c9
bump CI
sam0x17 14ef35f
nit
sam0x17 ee570d3
proper handling of too many + too few block/extrinsic call annotations
sam0x17 9660e5e
change to B >= A
sam0x17 1d559fb
remove unneeded ignore
sam0x17 d261bc5
remove another ignore
sam0x17 88c8ada
add ui tests
sam0x17 93613ee
use _() style extrinsic call on accumulate_dummy
sam0x17 2871686
add range check to ParamRange
sam0x17 16d3581
ui test for bad param ranges
sam0x17 68e2714
fix failing example
sam0x17 29308ac
add ignore back to other failing example
sam0x17 0601567
Merge branch 'master' into sam-benchmarking-overhaul
sam0x17 be0439b
tweak expr_call span
sam0x17 9d0e919
fix typo
sam0x17 232d4ca
eliminate a match
sam0x17 186ce01
change pub fn benchmarks to return Result<TokenStream>
sam0x17 b21ac54
fix origin error span
sam0x17 7fa5fe1
more informative error for invalid benchmark parameter name
sam0x17 014d527
fix spans on a few benchmark errors
sam0x17 b3f1ab0
remove unneeded clone
sam0x17 b9472f2
refactor inner loop of benchmark function parsing
sam0x17 0663c88
preserve mod attributes
sam0x17 7bcb5ce
refactor outer loop of benchmark def parsing code, greatly simplified
sam0x17 30fc19e
simplify to use a ? operator when parsing benchmark attr path
sam0x17 4a6520b
fix another ? operator
sam0x17 c720703
further simplify benchmark function attr parsing with more ? ops
sam0x17 8ecf30c
refactor extrinsic call handling to use if let rather than match
sam0x17 bd67fc0
replace is_ok => is_err
sam0x17 252bf6f
re-use name during expansion of benchmark def
sam0x17 d6de5a5
remove unneeded clone
sam0x17 091825b
fix span for origin missing error
sam0x17 43ee067
fix missing semi
sam0x17 d344df8
Merge remote-tracking branch 'origin/master' into sam-benchmarking-ov…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.