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

Auto publish predeploy contracts #2076

Merged
merged 7 commits into from
May 5, 2022
Merged

Conversation

zjb0807
Copy link
Member

@zjb0807 zjb0807 commented May 4, 2022

Closes: #2064

@zjb0807 zjb0807 requested a review from xlc May 4, 2022 08:45
@zjb0807
Copy link
Member Author

zjb0807 commented May 4, 2022

/bench runtime module module_evm

@ghost
Copy link

ghost commented May 4, 2022

Finished benchmark for branch: auto-publish-predeploy-contracts

Benchmark: Benchmark Runtime Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark pallet --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: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 202.6
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 202.6
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 192.5
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 192.5
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: EVM NetworkContractIndex (r:1 w:1)
Storage: System Account (r:3 w:3)
Storage: Balances Reserves (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 ~= 221.8
µs

Reads = 14
Writes = 12

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 221.8
µs

Reads = 14
Writes = 12

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:2 w:2)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: System Account (r:3 w:3)
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 ~= 227.4
µs

Reads = 13
Writes = 11

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 227.4
µs

Reads = 13
Writes = 11

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 168.3
µs

Reads = 12
Writes = 7

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 168.3
µs

Reads = 12
Writes = 7

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 115.8
µs

Reads = 3
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 115.8
µs

Reads = 3
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 139.9
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 139.9
µs

Reads = 4
Writes = 3

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 28.26
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 28.26
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 121.6
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 121.6
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 123.3
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 123.3
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 201.5
+ c 0.007
µs

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

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 206.7 1.065 0.5%
1228 215.5 0.722 0.3%
2456 224.3 0.623 0.2%
3684 235.7 0.595 0.2%
4912 248.1 8.717 3.5%
6140 250.1 1.101 0.4%
7368 259.5 2.007 0.7%
8596 271.5 1.067 0.3%
9824 276.8 2.6 0.9%
11052 284.4 0.679 0.2%
12280 293.2 0.698 0.2%
13508 307.3 4.369 1.4%
14736 310.7 0.288 0.0%
15964 323.5 6.329 1.9%
17192 328.4 0.92 0.2%
18420 458.9 57.5 12.5%
19648 367.3 26.2 7.1%
20876 355.2 1.271 0.3%
22104 364 0.486 0.1%
23332 375.6 4.525 1.2%
24560 385.2 3.966 1.0%
25788 393.4 3.88 0.9%
27016 401 3.708 0.9%
28244 408.1 1.152 0.2%
29472 417.7 3.277 0.7%
30700 426.3 2.925 0.6%
31928 439.7 6.243 1.4%
33156 474 4.483 0.9%
34384 478.7 6.178 1.2%
35612 483.4 0.985 0.2%
36840 492.5 3.089 0.6%
38068 506 5.323 1.0%
39296 514.7 4.535 0.8%
40524 524.6 5.935 1.1%
41752 539.1 6.841 1.2%
42980 550.8 7.639 1.3%
44208 547.3 1.361 0.2%
45436 560.9 5.22 0.9%
46664 571.4 4.565 0.7%
47892 574.5 1.235 0.2%
49120 671.5 102.4 15.2%
50348 742.5 61.88 8.3%
51576 694.5 28.28 4.0%
52804 696.3 85.83 12.3%
54032 696.8 78.71 11.2%
55260 634.7 9.044 1.4%
56488 640.8 4.765 0.7%
57716 651.5 6.281 0.9%
58944 658.6 4.386 0.6%
60172 674.7 6.808 1.0%
61400 681.6 5.966 0.8%

Quality and confidence:
param error
c 0

Model:
Time ~= 196.3
+ c 0.008
µs

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

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 148
µs

Reads = 8
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 148
µs

Reads = 8
Writes = 8

xlc
xlc previously approved these changes May 4, 2022
…hmarks --features=with-mandala-runtime -- benchmark pallet --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
@zjb0807
Copy link
Member Author

zjb0807 commented May 4, 2022

/bench runtime karura module_evm

@ghost
Copy link

ghost commented May 4, 2022

Finished benchmark for branch: auto-publish-predeploy-contracts

Benchmark: Benchmark Runtime Karura Module

cargo run --profile production --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark pallet --chain=karura-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/karura/src/weights/

Results

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 126.7
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 126.7
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 124.3
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 124.3
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: EVM NetworkContractIndex (r:1 w:1)
Storage: System Account (r:3 w:3)
Storage: Balances Reserves (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 ~= 139.7
µs

Reads = 14
Writes = 12

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 139.7
µs

Reads = 14
Writes = 12

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:2 w:2)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: System Account (r:3 w:3)
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 ~= 142.5
µs

Reads = 13
Writes = 11

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 142.5
µs

Reads = 13
Writes = 11

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 111.1
µs

Reads = 12
Writes = 7

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 111.1
µs

Reads = 12
Writes = 7

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 97.11
µs

Reads = 3
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 97.11
µs

Reads = 3
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 112.2
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 112.2
µs

Reads = 4
Writes = 3

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 19.29
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 19.29
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 99.78
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 99.78
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 101.4
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 101.4
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 153.2
+ c 0.007
µs

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

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 158.3 2.996 1.8%
1228 166.1 0.438 0.2%
2456 199.2 19.61 9.8%
3684 182.6 1.514 0.8%
4912 191.7 2.158 1.1%
6140 198.9 0.774 0.3%
7368 208 1.998 0.9%
8596 221 7.635 3.4%
9824 224.6 0.95 0.4%
11052 232.2 0.582 0.2%
12280 240.7 0.481 0.1%
13508 248.6 0.513 0.2%
14736 258.2 1.21 0.4%
15964 265.6 0.374 0.1%
17192 275 0.696 0.2%
18420 352.3 68.57 19.4%
19648 298.3 6.736 2.2%
20876 309.5 7.357 2.3%
22104 312.3 4.39 1.4%
23332 322.4 5.332 1.6%
24560 325 0.618 0.1%
25788 342.3 10.26 2.9%
27016 342.8 1.244 0.3%
28244 353.3 4.243 1.2%
29472 359 0.51 0.1%
30700 368.9 2.48 0.6%
31928 382 7.022 1.8%
33156 406.3 2.476 0.6%
34384 417.5 6.411 1.5%
35612 424.5 5.977 1.4%
36840 447.7 36.27 8.1%
38068 445.9 6.643 1.4%
39296 450.5 3.298 0.7%
40524 459.2 3.182 0.6%
41752 472.1 6.333 1.3%
42980 503.6 14.84 2.9%
44208 526.8 75.6 14.3%
45436 499.2 7.254 1.4%
46664 508.7 6.956 1.3%
47892 518.9 7.48 1.4%
49120 523 3.906 0.7%
50348 538.9 8.72 1.6%
51576 539.9 2.527 0.4%
52804 549.3 3.86 0.7%
54032 560.6 5.931 1.0%
55260 566.8 3.221 0.5%
56488 576.9 4.292 0.7%
57716 588.1 5.986 1.0%
58944 593.3 3.366 0.5%
60172 601.2 2.102 0.3%
61400 610.2 4.031 0.6%

Quality and confidence:
param error
c 0

Model:
Time ~= 154.5
+ c 0.008
µs

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

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 119.8
µs

Reads = 8
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 119.8
µs

Reads = 8
Writes = 8

@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #2076 (d695567) into master (200e653) will increase coverage by 0.37%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master    #2076      +/-   ##
==========================================
+ Coverage   85.96%   86.33%   +0.37%     
==========================================
  Files          96       99       +3     
  Lines       19424    21295    +1871     
==========================================
+ Hits        16698    18386    +1688     
- Misses       2726     2909     +183     
Impacted Files Coverage Δ
modules/evm/src/lib.rs 62.65% <83.33%> (+0.18%) ⬆️
modules/evm/src/tests.rs 99.27% <100.00%> (+<0.01%) ⬆️
modules/currencies/src/lib.rs 77.31% <0.00%> (ø)
primitives/src/currency.rs 55.46% <0.00%> (ø)
modules/currencies/src/tests.rs 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 200e653...d695567. Read the comment docs.

…untime-benchmarks --features=with-karura-runtime -- benchmark pallet --chain=karura-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/karura/src/weights/
@zjb0807
Copy link
Member Author

zjb0807 commented May 4, 2022

/bench runtime acala module_evm

@ghost
Copy link

ghost commented May 4, 2022

Finished benchmark for branch: auto-publish-predeploy-contracts

Benchmark: Benchmark Runtime Acala Module

cargo run --profile production --color=never --bin=acala --features=runtime-benchmarks --features=with-acala-runtime -- benchmark pallet --chain=acala-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/acala/src/weights/

Results

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 127.6
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 127.6
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 125.1
µs

Reads = 13
Writes = 10

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 125.1
µs

Reads = 13
Writes = 10

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: EVM NetworkContractIndex (r:1 w:1)
Storage: System Account (r:3 w:3)
Storage: Balances Reserves (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 ~= 139.2
µs

Reads = 14
Writes = 12

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 139.2
µs

Reads = 14
Writes = 12

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:2 w:2)
Storage: EvmAccounts Accounts (r:2 w:0)
Storage: System Account (r:3 w:3)
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 ~= 141.5
µs

Reads = 13
Writes = 11

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 141.5
µs

Reads = 13
Writes = 11

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 112.4
µs

Reads = 12
Writes = 7

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 112.4
µs

Reads = 12
Writes = 7

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)
Storage: EvmAccounts EvmAddresses (r:1 w:0)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 93.51
µs

Reads = 3
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 93.51
µs

Reads = 3
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 110
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 110
µs

Reads = 4
Writes = 3

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: EVM Accounts (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 19.42
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 19.42
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 98.44
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 98.44
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
Storage: Balances Reserves (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 98.84
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 98.84
µs

Reads = 2
Writes = 2

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 150.5
+ c 0.007
µs

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

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 154.4 0.629 0.4%
1228 163.8 0.765 0.4%
2456 173 1.208 0.6%
3684 181 2.071 1.1%
4912 190.1 1.708 0.8%
6140 196.1 0.211 0.1%
7368 204.5 0.424 0.2%
8596 221.7 6.371 2.8%
9824 221.9 0.362 0.1%
11052 230.7 0.577 0.2%
12280 240.3 2.628 1.0%
13508 249 3.494 1.4%
14736 257.3 3.005 1.1%
15964 274.4 9.229 3.3%
17192 272.8 0.566 0.2%
18420 281.6 1.333 0.4%
19648 298.2 7.007 2.3%
20876 305.8 9.133 2.9%
22104 306.4 0.537 0.1%
23332 318.6 4.298 1.3%
24560 324.9 3.361 1.0%
25788 333.6 2.931 0.8%
27016 341.4 1.896 0.5%
28244 348.4 1.265 0.3%
29472 359.9 4.134 1.1%
30700 367.6 3.178 0.8%
31928 375.1 3.519 0.9%
33156 402.1 1.045 0.2%
34384 415.5 5.472 1.3%
35612 420.3 0.807 0.1%
36840 434.9 6.618 1.5%
38068 443.4 6.242 1.4%
39296 447 1.633 0.3%
40524 476.8 20.97 4.3%
41752 467.2 4.242 0.9%
42980 476 4.125 0.8%
44208 483.7 2.362 0.4%
45436 496.3 3.634 0.7%
46664 508.2 8.176 1.6%
47892 534.1 13.68 2.5%
49120 519.3 2.678 0.5%
50348 530.7 3.652 0.6%
51576 539.4 4.289 0.7%
52804 548.4 5.045 0.9%
54032 555.4 2.988 0.5%
55260 564.6 3.415 0.6%
56488 572.9 3.861 0.6%
57716 583.2 5.058 0.8%
58944 591.6 3.47 0.5%
60172 604 5.026 0.8%
61400 615.7 7.115 1.1%

Quality and confidence:
param error
c 0

Model:
Time ~= 147.9
+ c 0.008
µs

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

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

Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
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 ~= 117.6
µs

Reads = 8
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 117.6
µs

Reads = 8
Writes = 8

…untime-benchmarks --features=with-acala-runtime -- benchmark pallet --chain=acala-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/acala/src/weights/
@zjb0807 zjb0807 enabled auto-merge (squash) May 4, 2022 23:54
@zjb0807 zjb0807 merged commit ed06d5d into master May 5, 2022
@zjb0807 zjb0807 deleted the auto-publish-predeploy-contracts branch May 5, 2022 05:21
syan095 pushed a commit that referenced this pull request May 8, 2022
…rrencyIds

* origin/master:
  add xcm instruction RefundSurplus after Transact (#2088)
  rm dex share duplicate code (#2089)
  precompile (#2049)
  Remove honzon global paramter (#2071)
  update orml (#2077)
  Auto publish predeploy contracts (#2076)

# Conflicts:
#	modules/cdp-engine/src/lib.rs
#	modules/cdp-engine/src/tests.rs
#	runtime/acala/src/lib.rs
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.

Automatically publish predeploy contracts
2 participants