AstarNetwork / astar-frame

Core frame modules for Astar & Shiden network.
Other
58 stars 38 forks source link

DappsStaking bench improvements #112

Closed shunsukew closed 1 year ago

shunsukew commented 1 year ago

Pull Request Summary Dapps Staking CurrentEra storage value is accessed by on_initialize hook at every block. That means current era value is available in overlay cache, thus we can ignore storage access from benchmarking.

New attribute macro #[pallet::whitelist_storage] registers Storage items to whitelists (which will be ignored in benchmarking), see more details https://github.com/paritytech/substrate/pull/12205.

This requires Astar repo updates too, but adding attribute can be done independently.

This PR fixes format issue as well cargo fmt, taplo fmt to pass merge blocking.

github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Branch Rate Health
frame/dapps-staking/src/pallet 90% 0%
precompiles/substrate-ecdsa/src 78% 0%
frame/block-reward/src 85% 0%
precompiles/utils/src 72% 0%
chain-extensions/types/xvm/src 0% 0%
frame/xc-asset-config/src 70% 0%
precompiles/assets-erc20/src 73% 0%
frame/pallet-xcm/src 65% 0%
frame/dapps-staking/src 83% 0%
precompiles/utils/macro/src 0% 0%
precompiles/sr25519/src 79% 0%
precompiles/xvm/src 94% 0%
primitives/xcm/src 68% 0%
chain-extensions/types/rmrk/src 0% 0%
frame/pallet-xvm/src/pallet 34% 0%
frame/pallet-xvm/src 11% 0%
chain-extensions/types/dapps-staking/src 0% 0%
chain-extensions/dapps-staking/src 0% 0%
frame/custom-signatures/src 57% 0%
chain-extensions/rmrk/src 0% 0%
precompiles/utils/macro/tests 0% 0%
frame/collator-selection/src 80% 0%
precompiles/dapps-staking/src 93% 0%
precompiles/xcm/src 84% 0%
precompiles/utils/src/data 72% 0%
chain-extensions/xvm/src 0% 0%
Summary 60% (2577 / 4328) 0% (0 / 0)

Minimum allowed line rate is 50%