Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Benchmarks script improvements #2214

Merged
merged 3 commits into from
Feb 21, 2023
Merged

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Feb 20, 2023

The updated scripts are backward compatible.

Updates:

  • use pallet list command instead static list (easy to forget to update the list, e.g. pallet_xcm is missing now);
  • additional arguments with default values (useful for local runs).

@muharem muharem added B0-silent Changes should not be mentioned in any release notes A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Feb 20, 2023
category=$1
runtimeName=$2
artifactsDir=$3
steps=${4:-50}
repeat=${5:-20}

benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights
benchmarkRuntimeName="$runtimeName-dev"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muharem
what about renaming benchmarkRuntimeName -> benchmarkRuntimeChain ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtimes have names. chains are run by nodes and run runtimes.

Copy link
Contributor

@bkontur bkontur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice to remove those IFs :)

@muharem
Copy link
Contributor Author

muharem commented Feb 21, 2023

bot rebase

@paritytech-processbot
Copy link

Rebased

@muharem
Copy link
Contributor Author

muharem commented Feb 21, 2023

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

cut -d',' -f1 |\
sort |\
uniq
))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is assuming that all pallets will get benchmarked. Just wondering if there's any pallets left that we currently still use hardcoded substrate weights from? I guess if you've run this for low repetitions and had no trouble then this should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it does not. if the pallet not listed in define_benchmarks macro, it wont be returned by the command

@paritytech-processbot paritytech-processbot bot merged commit d21bfd7 into master Feb 21, 2023
@paritytech-processbot paritytech-processbot bot deleted the muharem-benchmarks-script branch February 21, 2023 10:26
ordian added a commit that referenced this pull request Feb 27, 2023
* master: (35 commits)
  add turboflakes system-chains bootnodes (#2223)
  Companion for #13349 (#2217)
  bump `zombienet` version to v1.3.35 (#2226)
  [ci] Return benchmark to bm machines (#2225)
  Collectives chain xcm filter (#2222)
  Add metaspan.io parachain boot nodes (#2218)
  Companion for #13390 (#2189)
  `BlockId` removal: `BlockBuilderProvider::new_block_at` (#2219)
  Benchmarks script improvements (#2214)
  `BlockId` removal: refactor of runtime API (#2190)
  Rename .feature extension to .zndsl (#2215)
  Companion for paritytech/polkadot#6744: Retire `OldV1SessionInfo` (#2213)
  WIP: Fix templates (#2204)
  Add stake.plus bootnodes to collectives-westend and bridge-hub-kusama (#2201)
  Polkadot companion #6603: Use a `BoundedVec` in `ValidationResult` (#2161)
  Bump clap from 4.1.4 to 4.1.6 (#2193)
  Bump toml from 0.6.0 to 0.7.2 (#2170)
  companion for paritytech/polkadot#6161 (#2151)
  Bump serde_json from 1.0.92 to 1.0.93 (#2175)
  add warp_sync_params (#1909)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants