Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark evm #1674

Merged
merged 35 commits into from
Jan 12, 2022
Merged

Benchmark evm #1674

merged 35 commits into from
Jan 12, 2022

Conversation

ermalkaleci
Copy link
Contributor

No description provided.

@ermalkaleci
Copy link
Contributor Author

/bench evm

@ghost
Copy link

ghost commented Dec 7, 2021

Error running benchmark: benchmark_evm

stdoutNode benchmarks only available on Substrate.

@ermalkaleci
Copy link
Contributor Author

/bench evm

@ghost
Copy link

ghost commented Dec 7, 2021

Error running benchmark: benchmark_evm

stdoutNode benchmarks only available on Substrate.

@ermalkaleci
Copy link
Contributor Author

/bench evm

@ghost
Copy link

ghost commented Dec 8, 2021

Error running benchmark: benchmark_evm

stdoutNode benchmarks only available on Substrate.

@ermalkaleci
Copy link
Contributor Author

/bench evm

@ghost
Copy link

ghost commented Dec 8, 2021

Finished benchmark for branch: benchmark_evm

Benchmark: EVM

make bench-evm

Results

cargo bench -p module-evm --features bench | evm-bench/analyze_benches.js runtime/common/src/gas_to_weight_ratio.rs
┌─────────┬───────────────────────┬───────┬────────┬────────────┬──────────────┬──────────┬───────┐
│ (index) │ name │ reads │ writes │ weight │ total_weight │ used_gas │ ratio │
├─────────┼───────────────────────┼───────┼────────┼────────────┼──────────────┼──────────┼───────┤
│ 0 │ 'erc20_transfer' │ 2 │ 2 │ 238906000 │ 488906000 │ 51582 │ 9478 │
│ 1 │ 'ballot_vote' │ 5 │ 3 │ 251213000 │ 676213000 │ 72012 │ 9390 │
│ 2 │ 'ballot_delegate' │ 4 │ 2 │ 256565000 │ 556565000 │ 73340 │ 7588 │
│ 3 │ 'erc20_approve' │ 1 │ 1 │ 204380000 │ 329380000 │ 44493 │ 7402 │
│ 4 │ 'erc20_approve_many' │ 100 │ 100 │ 4330790000 │ 16830790000 │ 2301136 │ 7314 │
│ 5 │ 'storage_store' │ 1 │ 1 │ 156580000 │ 281580000 │ 41624 │ 6764 │
│ 6 │ 'erc20_transfer_many' │ 101 │ 101 │ 7280956000 │ 19905956000 │ 3004492 │ 6625 │
│ 7 │ 'storage_store_many' │ 101 │ 101 │ 3511214000 │ 16136214000 │ 2647177 │ 6095 │
│ 8 │ 'empty_noop' │ 0 │ 0 │ 69921000 │ 69921000 │ 21186 │ 3300 │
│ 9 │ 'empty_deploy' │ 0 │ 0 │ 167719000 │ 167719000 │ 76975 │ 2178 │
│ 10 │ 'storage_deploy' │ 0 │ 0 │ 174239000 │ 174239000 │ 187075 │ 931 │
│ 11 │ 'ballot_deploy' │ 5 │ 5 │ 324064000 │ 949064000 │ 1054380 │ 900 │
│ 12 │ 'erc20_deploy' │ 4 │ 4 │ 366431000 │ 866431000 │ 1333500 │ 649 │
└─────────┴───────────────────────┴───────┴────────┴────────────┴──────────────┴──────────┴───────┘
Ratio 9478

@ermalkaleci
Copy link
Contributor Author

/bench runtime module module_evm

@ghost
Copy link

ghost commented Dec 8, 2021

Finished benchmark for branch: benchmark_evm

Benchmark: Benchmark Runtime Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./modules/evm/src/weights.rs --template=./templates/module-weight-template.hbs

Results

Compiling parity-wasm v0.32.0
Compiling bencher-procedural v0.1.0 (/app/git/Acala/orml/bencher/bencher-procedural)
Compiling acala-cli v2.1.0 (/app/git/Acala/node/cli)
Compiling semver v0.11.0
Compiling camino v1.0.5
Compiling cargo-platform v0.1.2
Compiling polkadot-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling rococo-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling westend-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling kusama-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling node-runtime v3.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.13#fcc54a72)
Compiling karura-runtime v2.1.0 (/app/git/Acala/runtime/karura)
Compiling acala-runtime v2.1.0 (/app/git/Acala/runtime/acala)
Compiling mandala-runtime v2.1.0 (/app/git/Acala/runtime/mandala)
Compiling cargo_metadata v0.13.1
Compiling wasm-gc-api v0.1.11
Compiling orml-currencies v0.4.1-dev (/app/git/Acala/orml/currencies)
Compiling module-idle-scheduler v2.1.0 (/app/git/Acala/modules/idle-scheduler)
Compiling orml-bencher v0.4.1-dev (/app/git/Acala/orml/bencher)
Compiling node-executor v3.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.13#fcc54a72)
Compiling module-evm v2.1.0 (/app/git/Acala/modules/evm)
Compiling module-evm-bridge v2.1.0 (/app/git/Acala/modules/evm-bridge)
Compiling evm-rpc v2.1.0 (/app/git/Acala/modules/evm/rpc)
Compiling polkadot-client v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling cumulus-primitives-parachain-inherent v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling cumulus-client-network v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling cumulus-client-consensus-aura v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling cumulus-client-consensus-relay-chain v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling cumulus-pallet-parachain-system v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling cumulus-client-collator v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling runtime-common v2.1.0 (/app/git/Acala/runtime/common)
Compiling polkadot-service v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling acala-rpc v2.1.0 (/app/git/Acala/rpc)
Compiling cumulus-client-service v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc)
Compiling acala-service v2.1.0 (/app/git/Acala/node/service)
Compiling polkadot-cli v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9)
Compiling acala v2.1.0 (/app/git/Acala/node)
Finished release [optimized] target(s) in 14m 18s
Running target/release/acala benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm '--extrinsic=*' --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./modules/evm/src/weights.rs --template=./templates/module-weight-template.hbs
Error: Input("Error executing and verifying runtime benchmark: Other("Wasm execution trapped: wasm trap: unreachable\nwasm backtrace:\n 0: 0x7d71 - !rust_begin_unwind\n 1: 0x76cd - !core::panicking::panic_fmt::h8f11323637b4db3b\n 2: 0x6dbf - !core::panicking::panic::hc35917361a82c412\n 3: 0x4dca6d - !core::ops::function::FnOnce::call_once{{vtable.shim}}::h96ca7237f2bc6b6f\n 4: 0x230852 - !<mandala_runtime::benchmarking::evm::Benchmark as frame_benchmarking::utils::Benchmarking>::run_benchmark::h86cd34116443326c\n 5: 0x1ed4c6 - !<mandala_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,acala_primitives::unchecked_extrinsic::AcalaUncheckedExtrinsic<mandala_runtime::Call,(frame_system::extensions::check_spec_version::CheckSpecVersion<mandala_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<mandala_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<mandala_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<mandala_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<mandala_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<mandala_runtime::Runtime>,module_transaction_payment::ChargeTransactionPayment<mandala_runtime::Runtime>,module_evm::SetEvmOrigin<mandala_runtime::Runtime>),mandala_runtime::ConvertEthereumTx,mandala_runtime::StorageDepositPerByte,mandala_runtime::TxFeePerGas>>>>::dispatch_benchmark::h717c9481b37e68f1\n 6: 0x4ee903 - !Benchmark_dispatch_benchmark\n")")

@ferrell-code
Copy link
Contributor

ferrell-code commented Dec 8, 2021

fyi, changes to handlebars-rust upstream broke our handlebars templates #1688 will fix...

Edit: Nvm you already fixed that on your branch :p

@ermalkaleci
Copy link
Contributor Author

/bench runtime module module_evm

@ghost
Copy link

ghost commented Dec 15, 2021

Finished benchmark for branch: benchmark_evm

Benchmark: Benchmark Runtime Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./modules/evm/src/weights.rs --template=./templates/module-weight-template.hbs

Results

Pallet: "module_evm", Extrinsic: "create", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 275.1
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 275.1
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "create2", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 265.1
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 265.1
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "create_nft_contract", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM NetworkContractIndex (r:1 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:3 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 263.6
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 263.6
µs

Reads = 13
Writes = 10

Pallet: "module_evm", Extrinsic: "create_predeploy_contract", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts Accounts (r:2 w:0)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:3 w:2)
Storage: Balances Reserves (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 262.8
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 262.8
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "deposit_ed", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts Accounts (r:1 w:0)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 80.13
µs

Reads = 4
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 80.13
µs

Reads = 4
Writes = 2

Pallet: "module_evm", Extrinsic: "call", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:2 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Codes (r:1 w:0)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 220.1
µs

Reads = 11
Writes = 6

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 220.1
µs

Reads = 11
Writes = 6

Pallet: "module_evm", Extrinsic: "transfer_maintainer", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 137.1
µs

Reads = 2
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 137.1
µs

Reads = 2
Writes = 1

Pallet: "module_evm", Extrinsic: "deploy", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: System Account (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 172.3
µs

Reads = 3
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 172.3
µs

Reads = 3
Writes = 2

Pallet: "module_evm", Extrinsic: "deploy_free", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 32.34
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 32.34
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "enable_contract_development", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 149
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 149
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "disable_contract_development", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 149.7
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 149.7
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "set_code", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM CodeInfos (r:2 w:2)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)
Storage: EVM Codes (r:0 w:2)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 267.1
+ c 0.009
µs

Reads = 10 + (0 * c)
Writes = 9 + (0 * c)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 271.4 0.553 0.2%
1228 282.1 0.691 0.2%
2456 293.3 1.407 0.4%
3684 303.2 0.923 0.3%
4912 312.9 0.573 0.1%
6140 354.1 23.84 6.7%
7368 333.5 0.645 0.1%
8596 347.8 3.219 0.9%
9824 356 3.282 0.9%
11052 366.9 3.577 0.9%
12280 571 124.1 21.7%
13508 387.8 3.967 1.0%
14736 400 6.681 1.6%
15964 407.9 3.169 0.7%
17192 416.2 0.984 0.2%
18420 426.2 1.151 0.2%
19648 436 0.593 0.1%
20876 453.6 8.743 1.9%
22104 456.7 0.57 0.1%
23332 472.7 7.837 1.6%
24560 479.4 1.331 0.2%
25788 500.1 5.602 1.1%
27016 503.3 5.409 1.0%
28244 509.1 1.829 0.3%
29472 519.1 1.448 0.2%
30700 530.9 4.161 0.7%
31928 539.7 2.097 0.3%
33156 574.9 3.344 0.5%
34384 584 1.046 0.1%
35612 596.2 3.988 0.6%
36840 606.7 3.711 0.6%
38068 616.6 1.598 0.2%
39296 628.4 3.084 0.4%
40524 637.5 2.077 0.3%
41752 651.2 4.848 0.7%
42980 663.1 5.369 0.8%
44208 672.8 5.254 0.7%
45436 685 5.585 0.8%
46664 691.6 0.773 0.1%
47892 721.5 9.991 1.3%
49120 982.3 247.1 25.1%
50348 752.9 9.818 1.3%
51576 739.4 5.525 0.7%
52804 802.4 42.55 5.3%
54032 766.5 13.17 1.7%
55260 771.6 6.864 0.8%
56488 823.3 15.11 1.8%
57716 792.7 6.041 0.7%
58944 803.8 7.206 0.8%
60172 815.3 4.656 0.5%
61400 826.5 6.081 0.7%

Quality and confidence:
param error
c 0

Model:
Time ~= 269.4
+ c 0.009
µs

Reads = 10 + (0 * c)
Writes = 9 + (0 * c)

Pallet: "module_evm", Extrinsic: "selfdestruct", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts Accounts (r:1 w:0)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)
Storage: IdleScheduler NextTaskId (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: IdleScheduler Tasks (r:0 w:1)
Storage: EVM Codes (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 171.4
µs

Reads = 7
Writes = 7

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 171.4
µs

Reads = 7
Writes = 7

Acala Benchmarking Bot and others added 2 commits December 15, 2021 13:15
…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./modules/evm/src/weights.rs --template=./templates/module-weight-template.hbs
@ermalkaleci
Copy link
Contributor Author

/bench runtime mandala module_evm

@ghost
Copy link

ghost commented Dec 15, 2021

Finished benchmark for branch: benchmark_evm

Benchmark: Benchmark Runtime Mandala Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/

Results

Pallet: "module_evm", Extrinsic: "create", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 275.8
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 275.8
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "create2", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 262.9
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 262.9
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "create_nft_contract", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM NetworkContractIndex (r:1 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:3 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 262.5
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 262.5
µs

Reads = 13
Writes = 10

Pallet: "module_evm", Extrinsic: "create_predeploy_contract", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts Accounts (r:2 w:0)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:3 w:2)
Storage: Balances Reserves (r:2 w:2)
Storage: EVM Codes (r:1 w:1)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 260.7
µs

Reads = 12
Writes = 9

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 260.7
µs

Reads = 12
Writes = 9

Pallet: "module_evm", Extrinsic: "deposit_ed", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts Accounts (r:1 w:0)
Storage: System Account (r:2 w:2)
Storage: EVM Accounts (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 79.23
µs

Reads = 4
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 79.23
µs

Reads = 4
Writes = 2

Pallet: "module_evm", Extrinsic: "call", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:2 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:2 w:2)
Storage: EVM Codes (r:1 w:0)
Storage: EVM ContractStorageSizes (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 218.7
µs

Reads = 11
Writes = 6

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 218.7
µs

Reads = 11
Writes = 6

Pallet: "module_evm", Extrinsic: "transfer_maintainer", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 137.1
µs

Reads = 2
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 137.1
µs

Reads = 2
Writes = 1

Pallet: "module_evm", Extrinsic: "deploy", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: System Account (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 172.3
µs

Reads = 3
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 172.3
µs

Reads = 3
Writes = 2

Pallet: "module_evm", Extrinsic: "deploy_free", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 31.85
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 31.85
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "enable_contract_development", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 149.2
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 149.2
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "disable_contract_development", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 149.7
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 149.7
µs

Reads = 1
Writes = 1

Pallet: "module_evm", Extrinsic: "set_code", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM CodeInfos (r:2 w:2)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: Balances Reserves (r:2 w:2)
Storage: System Account (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)
Storage: EVM Codes (r:0 w:2)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 267.8
+ c 0.009
µs

Reads = 10 + (0 * c)
Writes = 9 + (0 * c)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 271.8 0.545 0.2%
1228 282.5 0.979 0.3%
2456 293 0.904 0.3%
3684 308.2 5.927 1.9%
4912 313.6 1.518 0.4%
6140 325.1 1.45 0.4%
7368 340.8 5.837 1.7%
8596 350.8 8.062 2.2%
9824 355.9 1.246 0.3%
11052 368 4.212 1.1%
12280 374.5 0.49 0.1%
13508 385.9 1.566 0.4%
14736 395.1 0.958 0.2%
15964 405.9 1.172 0.2%
17192 415.9 0.986 0.2%
18420 426.7 1.279 0.2%
19648 444 10.19 2.2%
20876 455.2 10.2 2.2%
22104 464.4 9.119 1.9%
23332 474.3 7.407 1.5%
24560 485.3 9.316 1.9%
25788 488.3 1.123 0.2%
27016 502.9 6.179 1.2%
28244 509.8 3.067 0.6%
29472 518.8 0.869 0.1%
30700 529.6 1.005 0.1%
31928 543.9 5.066 0.9%
33156 575.3 3.662 0.6%
34384 587.1 4.175 0.7%
35612 655.2 53.56 8.1%
36840 637.1 26.53 4.1%
38068 638.7 8.82 1.3%
39296 674.5 72.43 10.7%
40524 643.1 7.208 1.1%
41752 656.3 8.733 1.3%
42980 676.1 18.93 2.8%
44208 675.2 5.384 0.7%
45436 689.4 7.52 1.0%
46664 697 4.47 0.6%
47892 706.6 4.304 0.6%
49120 720 5.209 0.7%
50348 729.3 6.427 0.8%
51576 738.7 2.523 0.3%
52804 760 9.612 1.2%
54032 765.3 7.731 1.0%
55260 772.3 6.012 0.7%
56488 787.9 8.272 1.0%
57716 800.6 4.641 0.5%
58944 802.4 1.899 0.2%
60172 818.7 7.076 0.8%
61400 831.1 8.125 0.9%

Quality and confidence:
param error
c 0

Model:
Time ~= 265.1
+ c 0.009
µs

Reads = 10 + (0 * c)
Writes = 9 + (0 * c)

Pallet: "module_evm", Extrinsic: "selfdestruct", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts Accounts (r:1 w:0)
Storage: EVM CodeInfos (r:1 w:1)
Storage: EVM ContractStorageSizes (r:1 w:1)
Storage: IdleScheduler NextTaskId (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: IdleScheduler Tasks (r:0 w:1)
Storage: EVM Codes (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 171.7
µs

Reads = 7
Writes = 7

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 171.7
µs

Reads = 7
Writes = 7

Acala Benchmarking Bot and others added 4 commits December 15, 2021 13:59
…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_evm --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
@ermalkaleci ermalkaleci marked this pull request as ready for review January 5, 2022 13:18
Copy link
Contributor

@ferrell-code ferrell-code left a comment

Choose a reason for hiding this comment

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

It all looks reasonable to me. We may want to in the future setup an e2e test filling blocks to the maximum block weight on different evm calls and seeing if block production slows/stalls

@xlc xlc merged commit 6517b1a into master Jan 12, 2022
@xlc xlc deleted the benchmark_evm branch January 12, 2022 22:19
syan095 pushed a commit that referenced this pull request Jan 13, 2022
* origin/master: (53 commits)
  add new audit report
  Use ExitReason::Revert instead of ExitReason::Error (#1772)
  Claim Account to use Eip-712 (#1755)
  Benchmark evm (#1674)
  support evm create rpc and allow H160 default (#1771)
  Update template files license header. (#1770)
  Fix collect_fee (#1766)
  handle nonce for eth tx (#1707)
  updated to the ORML's test coverage file (#1760)
  rm runtime upgrade (#1757)
  Happy new year 2022. (#1761)
  Excluded some files from test coverage (#1759)
  XCM: add deposit error handler for multi-currency adapter. (#1756)
  update stable asset (#1758)
  Fix test coverage for acala (#1590)
  Fix collect_fee (#1754)
  Update HEADER-GPL3
  Update extrinsic-ordering-check-from-bin.yml (#1752)
  Update HEADER-GPL3
  bump version (#1751)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants