-
Notifications
You must be signed in to change notification settings - Fork 2.7k
FRAME Weights with Storage Metadata #9471
Conversation
frame/multisig/src/weights.rs
Outdated
| .saturating_add(RocksDbWeight::get().reads(2 as Weight)) | ||
| .saturating_add(RocksDbWeight::get().writes(1 as Weight)) | ||
| } | ||
| // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) |
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.
unknown?
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.
{
"name": ":extrinsic_index",
"key": "0x3a65787472696e7369635f696e646578"
},
| pub struct SubstrateWeight<T>(PhantomData<T>); | ||
| impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { | ||
| // Storage: TransactionStorage EntryFee (r:1 w:0) | ||
| // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) |
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.
{
"name": ":extrinsic_index",
"key": "0x3a65787472696e7369635f696e646578"
},
|
System benchmarks probably need to be updated |
|
/benchmark runtime pallet frame_system |
|
Benchmark Runtime Pallet for branch "shawntabrizi-weights-with-meta" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-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 Results |
|
/benchmark runtime pallet pallet_democracy |
|
Benchmark Runtime Pallet for branch "shawntabrizi-weights-with-meta" 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_democracy --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/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_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
|
/benchmark runtime pallet pallet_bounties |
|
Benchmark Runtime Pallet for branch "shawntabrizi-weights-with-meta" 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_bounties --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/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_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs
|
/benchmark runtime pallet pallet_bounties |
|
Benchmark Runtime Pallet for branch "shawntabrizi-weights-with-meta" 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_bounties --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/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_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs
|
/benchmark runtime pallet pallet_election_provider_multi_phase |
|
Benchmark Runtime Pallet for branch "shawntabrizi-weights-with-meta" 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_election_provider_multi_phase --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/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_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
| name: benchmark.as_bytes().to_vec(), | ||
| components, | ||
| } | ||
| }).collect::<$crate::Vec<_>>() |
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.
nit:
| }).collect::<$crate::Vec<_>>() | |
| }).collect() |
This is ok because the return type is specified, so the compiler can reason about what type the iterator should collect into.
| genesis_storage.clone(), | ||
| cache_size, | ||
| self.record_proof, | ||
| true, |
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.
It's not quite obvious what this boolean represents when looking at the code, perhaps create a new enum that is more descriptive?
enum Tracking { Enable, Disable }
KiChjang
left a comment
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.
Small nits, doesn't really matter if they're addressed or not.
|
bot merge |
|
Waiting for commit status. |
Co-authored-by: Keith Yeung <[email protected]>
Results of running benchmarks on: #9373
#[skip_meta]tag to hide storage metadata comments for items where lots of random keys are touched.external-repeatflag to do repeats from the client, although tests show that running it in the runtime gives better results.componentsloop out of the runtime, so the runtime truly just executes the benchmarks.LinkedHashMapfor tracking storage keys so the order is consistenta few updates for context:
you can test this yourself by running a benchmark with --repeat=x and then replace that with --external-repeat=x
so when you run a benchmark the following will happen: