Integrate benchmark-overhead command#5137
Integrate benchmark-overhead command#5137paritytech-processbot[bot] merged 17 commits intomasterfrom
benchmark-overhead command#5137Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
benchmark-overhead commandbenchmark-overhead command
|
bot rebase |
|
Rebasing |
node/client/src/lib.rs
Outdated
| /// | ||
| /// This is not done as a trait function since the return type depends on the runtime. | ||
| /// This macro therefore uses the same approach as [`with_client!`]. | ||
| macro_rules! with_raw_payload { |
There was a problem hiding this comment.
The problem is that every runtime has their own SignedExtra and SignedPayload.
These types do not share any trait, so I cannot use a trait instead.
The with_client macro was done for a similar reason which did not work with a trait.
I personally don't like it but did not see an easier solution.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
node/client/src/lib.rs
Outdated
| let $extra: runtime::SignedExtra = ( | ||
| frame_system::CheckNonZeroSender::<runtime::Runtime>::new(), | ||
| frame_system::CheckSpecVersion::<runtime::Runtime>::new(), | ||
| frame_system::CheckTxVersion::<runtime::Runtime>::new(), | ||
| frame_system::CheckGenesis::<runtime::Runtime>::new(), | ||
| frame_system::CheckMortality::<runtime::Runtime>::from(sp_runtime::generic::Era::mortal( | ||
| $period, | ||
| $current_block, |
There was a problem hiding this comment.
Looks like a lot of duplicate code that can continue to be macro-ized?
There was a problem hiding this comment.
The SignedExtras are slightly different for Polkadot, since they have one more entry. But I can sum up the other three ones, which would make the macro a bit more complicated though.
PS: Shortened it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
bot rebase |
|
Rebasing |
|
I will merge this as-is and then think about a better structure for the commands and how to use them from polkadot. |
|
bot merge |
PS: Integration note for para-chains
Please consider the following MRs when integrating this change: #5270 and paritytech/substrate#12147.
Integrate the
benchmark-overheadcommand from paritytech/substrate#10977 to benchmark the per-block and per-extrinsic execution overhead.with_signed_payload!macro which createsSignedPayloadfor each relay-runtimebenchmark_inherent_datawhich creates inherent data for all relay-runtimebenchmark-overheadfor each relay-runtimeThe only problem that I currently have here is that it prints
CurrentBlockRandomness did not provide entropyfor every extrinsic or block, I don't know.