Skip to content

Commit

Permalink
rework benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
KitHat committed Oct 29, 2024
1 parent baf6cce commit 5577dbb
Show file tree
Hide file tree
Showing 6 changed files with 392 additions and 114 deletions.
3 changes: 2 additions & 1 deletion procedural/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Supported abstractions:
| `EVM` | * `fp_rpc::EthereumRuntimeRPCApi`<br>* `fp_rpc::ConvertTransactionRuntimeApi` | * `RuntimeCall` -- runtime call generated by `construct_runtime` macro<br>* `Executive` -- `frame_executive::Executive` specification used by parachain system<br>* `Ethereum` -- `pallet_ethereum` pallet struct generated by `construct_runtime` macro |
| `assets` | * `pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi`<br>* `pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi` | * `TransactionPayment` -- `pallet_transaction_payment` struct pallet generated by `construct_runtime` macro<br> * `RuntimeCall` -- runtime call generated by `construct_runtime` macro<br> * `Balance` -- type used for balance specification (e.g. in `pallet_balances` config) |
| `consensus` | * `sp_consensus_aura::AuraApi`<br> * `sp_session::SessionKeys`<br> * `cumulus_primitives_aura::AuraUnincludedSegmentApi` (if `async-backing` feature is enabled) | * `SessionKeys` -- struct generated by `impl_opaque_keys` macro <br> * `Aura` -- `pallet_aura` struct pallet generated by `construct_runtime` macro (only if `async-backing` feature is not enabled)<br> * `SlotDuration` -- constant that is use for slot duration definition (only if `async-backing` feature is enabled)<br> * `ConsensusHook` -- type that is used in `cumulus_pallet_parachain_system::Config::ConsensusHook` (only if `async-backing` feature is enabled) |
| `system` | * `sp_api::Core`<br> * `sp_api::Metadata`<br> * `sp_block_builder::BlockBuilder`<br> * `sp_transaction_pool::runtime_api::TaggedTransactionQueue` <br> * `sp_offchain::OffchainWorkerApi` <br> * `frame_system_rpc_runtime_api::AccountNonceApi` <br> * `cumulus_primitives_core::CollectCollationInfo` <br> * `frame_try_runtime::TryRuntime` (under a `try-runtime` feature) <br> * `sp_genesis_builder::GenesisBuilder`<br> * `frame_system_benchmarking::Config` (under a `runtime-benchmarks` feature) | * `Executive` -- `frame_executive::Executive` specification used by parachain system<br> * `System` -- `frame_system` pallet struct generated by `construct_runtime` macro<br> * `ParachainSystem` -- `cumulus_pallet_parachain_system` pallet struct generated by `construct_runtime` macro<br> * `RuntimeVersion` -- runtime version, generated by `sp_version::runtime_version`<br> * `AccountId` -- account id type that was specified in `frame_system::Config`<br> * `Nonce` -- npnce type that was specified in `frame_system::Config`<br> * `RuntimeGenesisBuilder` -- type generated by `construct_runtime` macro. |
| `system` | * `sp_api::Core`<br> * `sp_api::Metadata`<br> * `sp_block_builder::BlockBuilder`<br> * `sp_transaction_pool::runtime_api::TaggedTransactionQueue` <br> * `sp_offchain::OffchainWorkerApi` <br> * `frame_system_rpc_runtime_api::AccountNonceApi` <br> * `cumulus_primitives_core::CollectCollationInfo` <br> * `frame_try_runtime::TryRuntime` (under a `try-runtime` feature) <br> * `sp_genesis_builder::GenesisBuilder`<br> * `frame_system_benchmarking::Config` (under a `runtime-benchmarks` feature) | * `Executive` -- `frame_executive::Executive` specification used by parachain system<br> * `System` -- `frame_system` pallet struct generated by `construct_runtime` macro<br> * `ParachainSystem` -- `cumulus_pallet_parachain_system` pallet struct generated by `construct_runtime` macro<br> * `RuntimeVersion` -- runtime version, generated by `sp_version::runtime_version`<br> * `AccountId` -- account id type that was specified in `frame_system::Config`<br> * `Nonce` -- nonce type that was specified in `frame_system::Config`<br> * `RuntimeGenesisBuilder` -- type generated by `construct_runtime` macro. |
| `benchmarks` | * `frame_benchmarking::Benchmark` (under `runtime-benchmarks` feature) | * `Assets` -- `palet_assets` pallet struct generated by `construct_runtime` macro<br> * `AssetManager` -- `pallet_asset_manager` pallet struct generated by `construct_runtime` macro<br> * `AssetType` -- struct that describes foreign assets in XCM configuration (e.g. the one that was passed to `AssetType` field in `AssetsConfig`<br> * `RuntimeOrigin` -- type generated by `construct_runtime` macro<br> * `RelayLocation` -- `Location` type pointing to the relaychain.<br> * `ParachainSystem` -- `cumulus_pallet_parachain_system` pallet struct generated by `construct_runtime` macro<br> * `ExistentialDeposit` -- type that decribes existential deposit (e.g. the one passed to `SystemConfig`)<br> * `AssetId` -- type that describes internal asset id (e.g `AssetId` passet to `AssetsConfig`)<br> * `XCMConfig` -- struct that implements `xcm_executor::Config`. If you are using pallet abstractions it is generated by XCM abstraction and called `XcmExecutorConfig`<br> * `AccountId` -- account id type that was specified in `frame_system::Config`<br> * `Cents` -- constant that represents 1/100 of your native token.<br> * `FeeAssetId` -- type that describes an asset to pay XCM fees in. If you used an abstraction macro for XCM support, it was generated along the way and named `FeeAssetId`. <br> * `TransactionByteFee` -- type that describes fee per byte of data. If you used an abstraction macro for assets support it was generated with the same name.|

Check warning on line 60 in procedural/README.md

View workflow job for this annotation

GitHub Actions / typos

"decribes" should be "describes".

Also, this macro implements `frame_benchmarking::Benchmark` for all of the specified pallets.
Loading

0 comments on commit 5577dbb

Please sign in to comment.