-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add benchmarking for parachain runtime paras pallet #3888
Conversation
/benchmark runtime westend runtime_parachains::paras |
Benchmark Runtime Westend Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs Results
|
…kckyeung/parachains-paras-benchmarking
…k --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
/benchmark runtime kusama runtime_parachains::paras |
Benchmark Runtime Kusama Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs Results
|
…k --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
/benchmark runtime westend runtime_parachains::paras |
Benchmark Runtime Westend Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs Results
|
…kckyeung/parachains-paras-benchmarking
…k --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
// Storage: Paras PastCodeHash (r:0 w:1) | ||
// Storage: Paras CodeByHash (r:0 w:1) | ||
fn force_set_current_code(c: u32, ) -> Weight { | ||
(0 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.
Ok, I've no idea what's going on here, this weight is worsened, but force_note_new_head
is clearly doing better.
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.
I think it is fine, if the length of code is 0 it shouldn't cost that much more than the storage read and writes I think no ?
/benchmark runtime kusama runtime_parachains::paras |
Benchmark Runtime Kusama Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs Results
|
…k --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
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.
some benchmark seems not completly accurate, maybe it is negligible or it should be addressed.
/benchmark runtime westend runtime_parachains::paras |
|
||
// 2 ^ 10, because binary search time complexity is O(log(2, n)) and n = 1024 gives us a | ||
// big and round number. | ||
const SAMPLE_SIZE: u32 = 1024; |
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.
maybe we should say that due to the limited number of parachains, the number of pruning, upcoming upgrades and cooldowns shouldn't exceed this number ?
/benchmark runtime westend runtime_parachains::paras |
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.
this nit: https://github.com/paritytech/polkadot/pull/3888/files#r712791711
But looks good to me
Benchmark Runtime Westend Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs Results
|
…kckyeung/parachains-paras-benchmarking
…k --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
/benchmark runtime kusama runtime_parachains::paras |
Benchmark Runtime Kusama Pallet for branch "kckyeung/parachains-paras-benchmarking" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs Results
|
…kckyeung/parachains-paras-benchmarking
…k --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
bot merge |
Trying merge. |
} | ||
force_queue_action { | ||
let para_id = ParaId::from(1000); | ||
generate_disordered_actions_queue::<T>(); |
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.
generate_disordered_actions_queue
fills up the actions queue with para id 1000, meaning a binary search for 1000
would be O(1) right? Would it be better to fill up the actions queue with anything but the id we are adding so we have to do a full binary search?
Part of #3850.