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 1.6k
[ci] Add short benchmarks to the pipeline #5188
Merged
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2ce85e2
[ci] Add short benchmarks to the pipeline
alvicsam 318f16e
fix bench
alvicsam 5c4cec8
divide build and bench
alvicsam fefa38c
debug
alvicsam ff7f33d
debug
alvicsam db896d9
remove build from bench script
alvicsam b6003f6
run benches on ci runners
alvicsam 28b4871
return full pipeline
alvicsam 262e98b
fix pipeline
alvicsam bd0a487
Update scripts/run_short_benches_for_runtime.sh
alvicsam c45bc5d
change short benchmark script
alvicsam d94a03e
Merge branch 'as-ci-short-bench' of github.com:paritytech/polkadot in…
alvicsam c692ff5
Merge remote-tracking branch 'origin/master' into as-ci-short-bench
f635d65
allow short bench fail
alvicsam 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Runs all benchmarks for all pallets, for a given runtime, provided by $1 | ||
| # Should be run on a reference machine to gain accurate benchmarks | ||
| # current reference machine: https://github.com/paritytech/substrate/pull/5848 | ||
|
|
||
| runtime="$1" | ||
|
|
||
| echo "[+] Running all benchmarks for $runtime" | ||
|
|
||
| ./artifacts/polkadot benchmark \ | ||
| --chain "${runtime}-dev" \ | ||
| --list |\ | ||
| tail -n+2 |\ | ||
| cut -d',' -f1 |\ | ||
| uniq | \ | ||
| grep -v frame_system > "${runtime}_pallets" | ||
|
|
||
| # For each pallet found in the previous command, run benches on each function | ||
| while read -r line; do | ||
| pallet="$(echo "$line" | cut -d' ' -f1)"; | ||
| echo "Runtime: $runtime. Pallet: $pallet"; | ||
| # '!' has the side effect of bypassing errexit / set -e | ||
| ! ./artifacts/polkadot benchmark \ | ||
| --chain="${runtime}-dev" \ | ||
| --steps=1 \ | ||
| --repeat=1 \ | ||
| --pallet="$pallet" \ | ||
| --extrinsic="*" \ | ||
| --execution=wasm \ | ||
| --wasm-execution=compiled \ | ||
| --heap-pages=4096 \ | ||
| --header=./file_header.txt \ | ||
| --output="./runtime/${runtime}/src/weights/${pallet/::/_}.rs" | ||
| done < "${runtime}_pallets" | ||
| rm "${runtime}_pallets" | ||
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.