mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 02:37:59 +00:00
99430a508d
* [Feature] Add XCM benchmarark weights to Statemint and Statemine * add xcm-bench-template * add polkadot xcm bench pallet to statemint * Sample benchmarking that compiles * add benches to the module * Remove batches assertion and whitelist ActiveConfig * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * fix benchmarks * fix get_multi_asset * fmt and more bench fixes * reformat * move Xcm type definitions * define types twice * remove commented out lines * define Xcm bench types globally * test use * fix semi * make sure the type definittion is properly documented * tweak TrustedTeleporter/Reserve * use dots as asset * copy benchmarks over, fix the ci script * remove extra asset * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * benchmarks setup for statemint/e and westmint * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::fungible * remove a check * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * implement WeightInfoBounds for all the asset runtimes * update Cargo.lock * fix Muharem's comments * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * Update parachains/runtimes/assets/statemint/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix some review comments * fix file headers * more fixes to licenses and such * fix another inconsistency * Extend weights template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * remove a placeholder * remove redundant overrides * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::fungible * Update benchmarking.rs * remove redundant bench * fix * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * Update pallets/xcm-benchmarks/src/fungible/mock.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * remove TODO's * remove local xcm-benchmark-pallet impl * disable CheckedAccount in benches * update template * fix up imports * fix xcm * fix the template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
66 lines
1.5 KiB
Bash
Executable File
66 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
steps=50
|
|
repeat=20
|
|
category=$1
|
|
runtimeName=$2
|
|
artifactsDir=$3
|
|
|
|
benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights
|
|
benchmarkRuntimeName="$runtimeName-dev"
|
|
|
|
if [[ $runtimeName == "statemint" ]] || [[ $runtimeName == "statemine" ]] || [[ $runtimeName == "westmint" ]]; then
|
|
pallets=(
|
|
pallet_assets
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_multisig
|
|
pallet_proxy
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
pallet_uniques
|
|
cumulus_pallet_xcmp_queue
|
|
frame_system
|
|
pallet_xcm_benchmarks::generic
|
|
pallet_xcm_benchmarks::fungible
|
|
)
|
|
elif [[ $runtimeName == "collectives-polkadot" ]]; then
|
|
pallets=(
|
|
pallet_alliance
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_collective
|
|
pallet_multisig
|
|
pallet_proxy
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
cumulus_pallet_xcmp_queue
|
|
frame_system
|
|
)
|
|
else
|
|
echo "$runtimeName pallet list not found in benchmarks-ci.sh"
|
|
exit 1
|
|
fi
|
|
|
|
for pallet in ${pallets[@]}
|
|
do
|
|
# a little hack for xcm benchmarks
|
|
output_file="${pallet//::/_}"
|
|
if [[ "$pallet" == *"xcm"* ]]; then
|
|
output_file="xcm/$output_file"
|
|
fi
|
|
$artifactsDir/polkadot-parachain benchmark pallet \
|
|
--chain=$benchmarkRuntimeName \
|
|
--execution=wasm \
|
|
--wasm-execution=compiled \
|
|
--pallet=$pallet \
|
|
--extrinsic='*' \
|
|
--steps=$steps \
|
|
--repeat=$repeat \
|
|
--json \
|
|
--header=./file_header.txt \
|
|
--output="${benchmarkOutput}/${output_file}.rs" >> $artifactsDir/${pallet}_benchmark.json
|
|
done
|