-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Benchmarking also benchmark for decoding the call #9343
Conversation
Sensible to have it IMO 👍🏻 |
I agree, if we are finding this is more and more relevant, we should definitely include it. How can we add a test so that we know this is working as expected? |
Was there any specific rational for not including it before? From my limited understanding it makes sense to always do this iff when processing the extrinsics in a block we always have to decode each one. |
/benchmark runtime pallet pallet_lottery |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
… gui-benchmark-decoding
/benchmark runtime pallet pallet_lottery |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs
/benchmark runtime pallet pallet_utility |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My macro literacy is not great, but from what I understand this makes sense.
Should we re-benchmark everything (including in polkadot) so when we make logic changes in the future they are based off a baseline that used the same benchmarking formula? Otherwise I would think all future benchmarks would be a bit high.
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_mmr --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/mmr/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
/benchmark runtime pallet pallet_lottery |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
/benchmark runtime pallet pallet_gilt |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/gilt/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
/benchmark runtime pallet pallet_uniques |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
/benchmark runtime pallet pallet_transaction_storage |
Benchmark Runtime Pallet for branch "gui-benchmark-decoding" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_transaction_storage --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/transaction-storage/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
bot merge |
Waiting for commit status. |
Merge failed: "Required status check "continuous-integration/gitlab-check-polkadot-companion-build" is failing." |
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) | ||
} | ||
} | ||
|
||
// For backwards compatibility and tests | ||
impl WeightInfo for () { | ||
fn remark(_b: u32, ) -> Weight { | ||
(1_038_000 as Weight) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting the weight is now only factor of message length
polkadot build will be fixed by paritytech/polkadot#3507 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bot merge |
Trying merge. |
bot merge |
Trying merge. |
in the benchmarking macro, when user use the syntax:
bench_name { $code }: $dispatch_name($origin, $args) verify { $code }
, the benchmark only dispatch the call. This PR changes it, instead the benchmark decode the call and dispatch it.Breaking change
Some benchmark code won't compile complaining about partially moved variables. It should be generally easily fixable using clone.