mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 07:31:08 +00:00
FRAME Weights with Storage Metadata (#9471)
* weights with metadata * fix * fix contract test * skip metadata tag * special handling for `frame_system` * 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 * add skip metadata to contracts * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix contract test * 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 * 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 * expose component information * fix test generation * refactor list benchmarks * move component selection out of runtime * add benchmark verification * missing feature * 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 * 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 * add internal repeats * update weights with internal repeats * fix warning * return error with pov * try without tracking * Revert "return error with pov" This reverts commit 44c36cbbd3c6818f36f377e3e291f1df156e40f7. * Revert "try without tracking" This reverts commit f401c44aebff2232389d8d307b20924891e5d77d. * Revert "Revert "try without tracking"" This reverts commit 4b4e05929802ad3e8154e107359447634e5fb21b. * state without tracking * fix build * temp test * split db and timing benchmarks * extend db results? * default repeat is internal * 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 * fix warning * bump linked hash map * use linked hash map for storage tracker * 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 * remove conflicting short 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 * missed one linked hashmap * 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 * 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 * 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 * new weights with latest changes * Update frame/benchmarking/src/utils.rs Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -288,6 +288,7 @@ benchmarks! {
|
||||
Storage::<T>::process_deletion_queue_batch(Weight::max_value())
|
||||
}
|
||||
|
||||
#[skip_meta]
|
||||
on_initialize_per_trie_key {
|
||||
let k in 0..1024;
|
||||
let instance = ContractWithStorage::<T>::new(k, T::Schedule::get().limits.payload_len)?;
|
||||
@@ -815,6 +816,7 @@ benchmarks! {
|
||||
}
|
||||
|
||||
// `d`: Number of supplied delta keys
|
||||
#[skip_meta]
|
||||
seal_restore_to_per_delta {
|
||||
let d in 0 .. API_BENCHMARK_BATCHES;
|
||||
let mut tombstone = ContractWithStorage::<T>::new(0, 0)?;
|
||||
@@ -1057,6 +1059,7 @@ benchmarks! {
|
||||
// The contract is a bit more complex because I needs to use different keys in order
|
||||
// to generate unique storage accesses. However, it is still dominated by the storage
|
||||
// accesses.
|
||||
#[skip_meta]
|
||||
seal_set_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
@@ -1122,6 +1125,7 @@ benchmarks! {
|
||||
// Similar to seal_set_storage. However, we store all the keys that we are about to
|
||||
// delete beforehand in order to prevent any optimizations that could occur when
|
||||
// deleting a non existing key.
|
||||
#[skip_meta]
|
||||
seal_clear_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
@@ -1165,6 +1169,7 @@ benchmarks! {
|
||||
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
|
||||
|
||||
// We make sure that all storage accesses are to unique keys.
|
||||
#[skip_meta]
|
||||
seal_get_storage {
|
||||
let r in 0 .. API_BENCHMARK_BATCHES;
|
||||
let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE)
|
||||
|
||||
@@ -1644,7 +1644,7 @@ fn self_destruct_works() {
|
||||
|
||||
// The call triggers rent collection that reduces the amount of balance
|
||||
// that remains for the beneficiary.
|
||||
let balance_after_rent = 93_078;
|
||||
let balance_after_rent = 93_086;
|
||||
|
||||
pretty_assertions::assert_eq!(
|
||||
System::events(),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user