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

Cdp Treasury Bench update #1609

Merged
merged 39 commits into from
Nov 17, 2021
Merged

Cdp Treasury Bench update #1609

merged 39 commits into from
Nov 17, 2021

Conversation

ferrell-code
Copy link
Contributor

No description provided.

ferrell-code and others added 9 commits November 11, 2021 23:36
…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
…hmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
@ferrell-code ferrell-code marked this pull request as draft November 12, 2021 21:33
@ferrell-code
Copy link
Contributor Author

/bench runtime acala module_cdp_treasury

1 similar comment
@ferrell-code
Copy link
Contributor Author

/bench runtime acala module_cdp_treasury

@ferrell-code
Copy link
Contributor Author

/bench runtime mandala module_cdp_treasury

@xlc
Copy link
Member

xlc commented Nov 13, 2021

/bench runtime mandala *

@ferrell-code
Copy link
Contributor Author

/bench runtime acala module_cdp_treasury

@ghost
Copy link

ghost commented Nov 13, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Acala Module

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

Results

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

Storage: Tokens Accounts (r:1 w:0)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:100)
Storage: Auction AuctionEndTime (r:0 w:100)
Storage: Auction Auctions (r:0 w:100)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2908
µs

Reads = 6
Writes = 304

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2908
µs

Reads = 6
Writes = 304

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

Storage: CdpTreasury ExpectedCollateralAuctionSize (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 21.19
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 21.19
µs

Reads = 0
Writes = 1

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

Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 66.84
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 66.84
µs

Reads = 4
Writes = 3

…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_cdp_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
@ferrell-code
Copy link
Contributor Author

/bench runtime karura module_cdp_treasury

@ghost
Copy link

ghost commented Nov 15, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Karura Module

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

Results

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

Storage: Tokens Accounts (r:1 w:0)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:100)
Storage: Auction AuctionEndTime (r:0 w:100)
Storage: Auction Auctions (r:0 w:100)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2956
µs

Reads = 6
Writes = 304

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2956
µs

Reads = 6
Writes = 304

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

Storage: CdpTreasury ExpectedCollateralAuctionSize (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 21.13
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 21.13
µs

Reads = 0
Writes = 1

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

Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 69.15
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 69.15
µs

Reads = 4
Writes = 3

Acala Benchmarking Bot and others added 3 commits November 15, 2021 20:25
…hmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_cdp_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
@ferrell-code
Copy link
Contributor Author

/bench runtime mandala module_cdp_treasury

@ghost
Copy link

ghost commented Nov 15, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

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_cdp_treasury --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/

Results

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

Storage: Tokens Accounts (r:1 w:0)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:100)
Storage: Auction AuctionEndTime (r:0 w:100)
Storage: Auction Auctions (r:0 w:100)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 2953
µs

Reads = 6
Writes = 304

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 2953
µs

Reads = 6
Writes = 304

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

Storage: CdpTreasury ExpectedCollateralAuctionSize (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 21.16
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 21.16
µs

Reads = 0
Writes = 1

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

Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 65.35
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 65.35
µs

Reads = 4
Writes = 3

…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_cdp_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
@ferrell-code ferrell-code marked this pull request as ready for review November 15, 2021 20:48
@ferrell-code
Copy link
Contributor Author

/bench runtime karura module_cdp_treasury module_cdp_engine

@ghost
Copy link

ghost commented Nov 16, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Karura Module

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

Results

Compiling mandala-runtime v2.0.0 (/app/git/Acala/runtime/mandala)
Compiling acala-runtime v2.0.0 (/app/git/Acala/runtime/acala)
Compiling karura-runtime v2.0.0 (/app/git/Acala/runtime/karura)
Compiling module-support v2.0.0 (/app/git/Acala/modules/support)
Compiling module-evm v2.0.0 (/app/git/Acala/modules/evm)
Compiling module-loans v2.0.0 (/app/git/Acala/modules/loans)
Compiling module-staking-pool v2.0.0 (/app/git/Acala/modules/staking-pool)
Compiling module-idle-scheduler v2.0.0 (/app/git/Acala/modules/idle-scheduler)
Compiling module-relaychain v2.0.0 (/app/git/Acala/modules/relaychain)
Compiling module-currencies v2.0.0 (/app/git/Acala/modules/currencies)
Compiling module-prices v2.0.0 (/app/git/Acala/modules/prices)
Compiling module-incentives v2.0.0 (/app/git/Acala/modules/incentives)
Compiling module-cdp-treasury v2.0.0 (/app/git/Acala/modules/cdp-treasury)
Compiling module-auction-manager v2.0.0 (/app/git/Acala/modules/auction-manager)
Compiling module-evm-accounts v2.0.0 (/app/git/Acala/modules/evm-accounts)
Compiling module-homa-lite v2.0.0 (/app/git/Acala/modules/homa-lite)
Compiling module-transaction-payment v2.0.0 (/app/git/Acala/modules/transaction-payment)
Compiling module-evm-manager v2.0.0 (/app/git/Acala/modules/evm-manager)
Compiling module-dex v2.0.0 (/app/git/Acala/modules/dex)
Compiling module-polkadot-bridge v2.0.0 (/app/git/Acala/modules/polkadot-bridge)
Compiling module-homa v2.0.0 (/app/git/Acala/modules/homa)
Compiling ecosystem-compound-cash v2.0.0 (/app/git/Acala/ecosystem-modules/compound-cash)
Compiling module-nominees-election v2.0.0 (/app/git/Acala/modules/nominees-election)
Compiling module-homa-validator-list v2.0.0 (/app/git/Acala/modules/homa-validator-list)
Compiling ecosystem-renvm-bridge v2.0.0 (/app/git/Acala/ecosystem-modules/ren/renvm-bridge)
Compiling ecosystem-starport v2.0.0 (/app/git/Acala/ecosystem-modules/starport)
Compiling module-staking-pool-rpc-runtime-api v2.0.0 (/app/git/Acala/modules/staking-pool/rpc/runtime-api)
Compiling module-cdp-engine v2.0.0 (/app/git/Acala/modules/cdp-engine)
Compiling module-emergency-shutdown v2.0.0 (/app/git/Acala/modules/emergency-shutdown)
Compiling runtime-common v2.0.0 (/app/git/Acala/runtime/common)
Compiling module-evm-bridge v2.0.0 (/app/git/Acala/modules/evm-bridge)
Compiling evm-rpc v2.0.0 (/app/git/Acala/modules/evm/rpc)
Compiling module-honzon v2.0.0 (/app/git/Acala/modules/honzon)
Compiling acala-rpc v2.0.0 (/app/git/Acala/rpc)
Compiling acala-service v2.0.0 (/app/git/Acala/node/service)
Compiling acala-cli v2.0.0 (/app/git/Acala/node/cli)
Compiling acala v2.0.0 (/app/git/Acala/node)
Finished release [optimized] target(s) in 8m 20s
Running target/release/acala benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_cdp_treasury module_cdp_engine '--extrinsic=*' --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
error: Found argument 'module_cdp_engine' which wasn't expected, or isn't valid in this context

USAGE:
acala benchmark --chain <CHAIN_SPEC> --extrinsic --pallet --repeat --steps

For more information try --help

@ferrell-code
Copy link
Contributor Author

/bench runtime karura module_cdp_engine

@ghost
Copy link

ghost commented Nov 16, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Karura Module

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

Results

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

Storage: CdpEngine LastAccumulationSecs (r:1 w:1)
Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: CdpEngine CollateralParams (r:2 w:0)
Storage: CdpEngine GlobalInterestRatePerSec (r:1 w:0)
Storage: Loans TotalPositions (r:2 w:0)
Storage: Timestamp Now (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 31.66
+ c 3.951
µs

Reads = 7 + (0 * c)
Writes = 2 + (0 * c)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 31.63 0.074 0.2%
1 35.6 0.103 0.2%

Quality and confidence:
param error
c 0.042

Model:
Time ~= 31.63
+ c 3.968
µs

Reads = 7 + (0 * c)
Writes = 2 + (0 * c)

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

Storage: CdpEngine CollateralParams (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 54.99
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 54.99
µs

Reads = 1
Writes = 1

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

Storage: CdpEngine GlobalInterestRatePerSec (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 18.64
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 18.64
µs

Reads = 0
Writes = 1

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:3 w:3)
Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:1 w:0)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: Dex TradingPairStatuses (r:1 w:0)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:1)
Storage: EvmAccounts Accounts (r:0 w:1)
Storage: Auction AuctionEndTime (r:0 w:1)
Storage: Auction Auctions (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 274.3
+ b 29.99
µs

Reads = 24 + (0 * b)
Writes = 17 + (3 * b)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
1 288.5 0.922 0.3%
2 317.4 1.009 0.3%
3 379.2 4.745 1.2%
4 377.4 0.91 0.2%
5 407.5 1.119 0.2%
6 467.7 4.413 0.9%
7 496.2 1.732 0.3%
8 493 1.36 0.2%
9 554.7 1.672 0.3%
10 552.2 1.708 0.3%
11 612.8 5.304 0.8%
12 644 5.098 0.7%
13 672 2.157 0.3%
14 700.5 2.059 0.2%
15 726.5 1.472 0.2%
16 729.2 3.341 0.4%
17 787.7 2.837 0.3%
18 816.8 3.045 0.3%
19 846.8 5.039 0.5%
20 845.3 3.344 0.3%
21 903.6 4.604 0.5%
22 934.7 2.663 0.2%
23 961.9 2.481 0.2%
24 991.1 1.97 0.1%
25 993.4 4.431 0.4%
26 1054 4.324 0.4%
27 1083 3.837 0.3%
28 1114 4.967 0.4%
29 1142 1.705 0.1%
30 1166 1.446 0.1%
31 1196 1.234 0.1%
32 1210 5.679 0.4%
33 1273 5.27 0.4%
34 1296 6.347 0.4%
35 1330 3.942 0.2%
36 1357 4.471 0.3%
37 1389 7.506 0.5%
38 1418 7.45 0.5%
39 1546 133.8 8.6%
40 1445 5.417 0.3%
41 1506 4.893 0.3%
42 1538 6.362 0.4%
43 1562 8.011 0.5%
44 1595 4.974 0.3%
45 1626 6.524 0.4%
46 1658 5.506 0.3%
47 1697 8.602 0.5%
48 1713 5.26 0.3%
49 1823 45.59 2.5%
50 1766 9.647 0.5%
51 1812 10.54 0.5%
52 1831 4.067 0.2%
53 1863 4.61 0.2%
54 1900 11.3 0.5%
55 1923 4.876 0.2%
56 1950 4.676 0.2%
57 1988 6.509 0.3%
58 2010 4.164 0.2%
59 2043 5.623 0.2%
60 2078 6.836 0.3%
61 2099 4.088 0.1%
62 2130 4.246 0.1%
63 2158 4.573 0.2%
64 2163 7.433 0.3%
65 2225 6.074 0.2%
66 2264 6.789 0.2%
67 2279 5.366 0.2%
68 2301 3.602 0.1%
69 2353 8.646 0.3%
70 2377 3.617 0.1%
71 2412 4.388 0.1%
72 2437 3.608 0.1%
73 2475 15.49 0.6%
74 2499 7.297 0.2%
75 2546 7.998 0.3%
76 2557 4.626 0.1%
77 2587 3.196 0.1%
78 2613 8.185 0.3%
79 2655 6.837 0.2%
80 2675 10.47 0.3%
81 2703 8.105 0.2%
82 2740 2.91 0.1%
83 2770 1.608 0.0%
84 2784 4.133 0.1%
85 2819 6.535 0.2%
86 2865 3.188 0.1%
87 2885 3.352 0.1%
88 3141 237.3 7.5%
89 3161 84.94 2.6%
90 2979 7.347 0.2%
91 2996 2.618 0.0%
92 3030 5.423 0.1%
93 3057 5.728 0.1%
94 3087 3.754 0.1%
95 3120 4.627 0.1%
96 3152 3.841 0.1%
97 3176 3.914 0.1%
98 3205 8.043 0.2%
99 3234 6.57 0.2%
100 3235 4.581 0.1%

Quality and confidence:
param error
b 0.05

Model:
Time ~= 268.4
+ b 30.2
µs

Reads = 24 + (0 * b)
Writes = 16 + (3 * b)

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: HomaLite TotalStakingCurrency (r:1 w:0)
Storage: Tokens TotalIssuance (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:6 w:6)
Storage: System Account (r:4 w:3)
Storage: EvmAccounts EvmAddresses (r:1 w:0)
Storage: EVM Accounts (r:1 w:0)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:0)
Storage: Dex TradingPairStatuses (r:3 w:0)
Storage: Dex LiquidityPool (r:2 w:2)
Storage: EvmAccounts Accounts (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 432.2
µs

Reads = 32
Writes = 17

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 432.2
µs

Reads = 32
Writes = 17

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 157.4
µs

Reads = 13
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 157.4
µs

Reads = 13
Writes = 8

…hmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
@ferrell-code
Copy link
Contributor Author

ferrell-code commented Nov 16, 2021

/bench runtime acala module_cdp_engine

@ghost
Copy link

ghost commented Nov 16, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Acala Module

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

Results

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

Storage: Tokens Accounts (r:1 w:0)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: System Account (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:1)
Storage: Auction AuctionEndTime (r:0 w:1)
Storage: Auction Auctions (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 54.81
+ b 30.09
µs

Reads = 6 + (0 * b)
Writes = 7 + (3 * b)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
1 68.9 0.304 0.4%
2 100.9 0.474 0.4%
3 160.7 0.328 0.2%
4 160.9 0.651 0.4%
5 190 0.991 0.5%
6 248.6 1.255 0.5%
7 279.6 1.047 0.3%
8 279.1 0.73 0.2%
9 338.4 2.607 0.7%
10 337.8 2.314 0.6%
11 395.7 1.084 0.2%
12 425 3.205 0.7%
13 454.2 0.83 0.1%
14 484.8 2.196 0.4%
15 515 4.162 0.8%
16 512 2.187 0.4%
17 574.2 0.991 0.1%
18 602.8 1.565 0.2%
19 630.8 1.369 0.2%
20 633.7 1.597 0.2%
21 690.1 2.483 0.3%
22 720.5 2.865 0.3%
23 746.3 1.468 0.1%
24 779 2.178 0.2%
25 777.2 1.843 0.2%
26 836.1 3.274 0.3%
27 866.6 4.513 0.5%
28 895.3 2.744 0.3%
29 928.7 6.163 0.6%
30 956.4 2.048 0.2%
31 985.3 3.788 0.3%
32 988.2 5.171 0.5%
33 1044 3.992 0.3%
34 1074 3.426 0.3%
35 1107 5.347 0.4%
36 1140 3.498 0.3%
37 1165 3.473 0.2%
38 1200 3.641 0.3%
39 1227 5.845 0.4%
40 1228 6.95 0.5%
41 1286 6.098 0.4%
42 1316 5.138 0.3%
43 1345 3.222 0.2%
44 1375 3.403 0.2%
45 1406 7.948 0.5%
46 1438 5.281 0.3%
47 1474 6.34 0.4%
48 1504 5.235 0.3%
49 1526 4.505 0.2%
50 1534 4.421 0.2%
51 1587 5.368 0.3%
52 1619 5.883 0.3%
53 1651 5.97 0.3%
54 1678 4.027 0.2%
55 1712 4.43 0.2%
56 1741 6.141 0.3%
57 1770 5.583 0.3%
58 1804 8.606 0.4%
59 1833 10.55 0.5%
60 1884 20.65 1.0%
61 1890 4.861 0.2%
62 1919 5.553 0.2%
63 1946 7.68 0.3%
64 1951 4.651 0.2%
65 2018 3.38 0.1%
66 2040 7.012 0.3%
67 2071 6.544 0.3%
68 2101 5.37 0.2%
69 2125 8.873 0.4%
70 2162 4.175 0.1%
71 2212 20.46 0.9%
72 2232 8.01 0.3%
73 2258 7.018 0.3%
74 2288 6.956 0.3%
75 2321 6.578 0.2%
76 2350 5 0.2%
77 2380 5.837 0.2%
78 2411 4.526 0.1%
79 2437 3.454 0.1%
80 2434 3.59 0.1%
81 2495 4.005 0.1%
82 2529 3.358 0.1%
83 2554 3.564 0.1%
84 2584 5.991 0.2%
85 2615 5.984 0.2%
86 2652 10.96 0.4%
87 2676 5.611 0.2%
88 2704 8.869 0.3%
89 2730 4.046 0.1%
90 2767 4.68 0.1%
91 2793 7.282 0.2%
92 2816 6.429 0.2%
93 2845 5.305 0.1%
94 2941 73.85 2.5%
95 2893 6.483 0.2%
96 2943 7.49 0.2%
97 2983 23.8 0.7%
98 3004 8.57 0.2%
99 3039 13.61 0.4%
100 3024 6.604 0.2%

Quality and confidence:
param error
b 0.017

Model:
Time ~= 51.33
+ b 30.15
µs

Reads = 6 + (0 * b)
Writes = 6 + (3 * b)

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

Storage: CdpTreasury ExpectedCollateralAuctionSize (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 21.77
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 21.77
µs

Reads = 0
Writes = 1

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

Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 69.04
µs

Reads = 4
Writes = 3

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 69.04
µs

Reads = 4
Writes = 3

ferrell-code and others added 2 commits November 16, 2021 00:10
…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_cdp_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
@ghost
Copy link

ghost commented Nov 16, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

Benchmark: Benchmark Runtime Acala Module

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

Results

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

Storage: CdpEngine LastAccumulationSecs (r:1 w:1)
Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: CdpEngine CollateralParams (r:2 w:0)
Storage: CdpEngine GlobalInterestRatePerSec (r:1 w:0)
Storage: Loans TotalPositions (r:2 w:0)
Storage: Timestamp Now (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 34.22
+ c 4.55
µs

Reads = 7 + (0 * c)
Writes = 2 + (0 * c)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 34.2 0.069 0.2%
1 38.82 0.255 0.6%

Quality and confidence:
param error
c 0.088

Model:
Time ~= 34.2
+ c 4.625
µs

Reads = 7 + (0 * c)
Writes = 2 + (0 * c)

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

Storage: CdpEngine CollateralParams (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 56.5
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 56.5
µs

Reads = 1
Writes = 1

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

Storage: CdpEngine GlobalInterestRatePerSec (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 19.61
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 19.61
µs

Reads = 0
Writes = 1

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:3 w:3)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: Dex TradingPairStatuses (r:1 w:0)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:1)
Storage: Auction AuctionEndTime (r:0 w:1)
Storage: Auction Auctions (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 270.9
+ b 30.07
µs

Reads = 22 + (0 * b)
Writes = 16 + (3 * b)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
1 283.8 0.999 0.3%
2 313.8 1.867 0.5%
3 369.8 1.617 0.4%
4 372.7 0.561 0.1%
5 402.6 1.297 0.3%
6 460.9 1.432 0.3%
7 489.3 0.935 0.1%
8 489 0.964 0.1%
9 545.8 0.666 0.1%
10 550.3 1.096 0.1%
11 609.1 1.947 0.3%
12 641.5 8.436 1.3%
13 667.5 1.514 0.2%
14 697.3 3.044 0.4%
15 758.4 61.27 8.0%
16 728.2 4.353 0.5%
17 1012 267.2 26.3%
18 814.8 2.487 0.3%
19 842.6 1.571 0.1%
20 845.4 1.934 0.2%
21 902.2 2.381 0.2%
22 935.9 7.341 0.7%
23 964.9 3.853 0.3%
24 990.7 5.54 0.5%
25 994 3.888 0.3%
26 1045 1.517 0.1%
27 1084 5.154 0.4%
28 1117 4.752 0.4%
29 1138 4.073 0.3%
30 1173 3.285 0.2%
31 1203 4.772 0.3%
32 1203 3.71 0.3%
33 1269 4.265 0.3%
34 1306 7.322 0.5%
35 1326 6.274 0.4%
36 1366 7.839 0.5%
37 1386 3.022 0.2%
38 1414 2.361 0.1%
39 1450 6.521 0.4%
40 1445 4.427 0.3%
41 1510 8.559 0.5%
42 1537 8.483 0.5%
43 1580 10.96 0.6%
44 1596 6.884 0.4%
45 1633 3.344 0.2%
46 1644 4.235 0.2%
47 1681 5.38 0.3%
48 1715 5.652 0.3%
49 1749 6.779 0.3%
50 1747 6.275 0.3%
51 1810 4.289 0.2%
52 1828 4.824 0.2%
53 2072 344.2 16.6%
54 1922 21.53 1.1%
55 1924 5.84 0.3%
56 1958 5.541 0.2%
57 1987 4.343 0.2%
58 2028 12.81 0.6%
59 2042 4.851 0.2%
60 2075 6.629 0.3%
61 2099 4.144 0.1%
62 2131 5.48 0.2%
63 2164 4.025 0.1%
64 2163 4.665 0.2%
65 2228 7.546 0.3%
66 2250 6.834 0.3%
67 2588 615.8 23.7%
68 2308 4.916 0.2%
69 2343 7.171 0.3%
70 2376 5.897 0.2%
71 2402 3.477 0.1%
72 2442 7.439 0.3%
73 2467 7.246 0.2%
74 2501 5.2 0.2%
75 2899 497 17.1%
76 2557 5.506 0.2%
77 2588 4.639 0.1%
78 2628 2.736 0.1%
79 2654 8.13 0.3%
80 2642 4.437 0.1%
81 2714 7.265 0.2%
82 2743 6.751 0.2%
83 2773 8.1 0.2%
84 2838 23.06 0.8%
85 2827 5.571 0.1%
86 2863 7.459 0.2%
87 2886 8.085 0.2%
88 2918 6.009 0.2%
89 2943 5.677 0.1%
90 2979 6.28 0.2%
91 3011 4.198 0.1%
92 3038 3.69 0.1%
93 3067 7.362 0.2%
94 3092 8.811 0.2%
95 3124 9.725 0.3%
96 3144 5.876 0.1%
97 3172 6.575 0.2%
98 3217 5.614 0.1%
99 3251 10.63 0.3%
100 3229 6.146 0.1%

Quality and confidence:
param error
b 0.118

Model:
Time ~= 275.7
+ b 30.17
µs

Reads = 22 + (0 * b)
Writes = 15 + (3 * b)

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: HomaLite TotalStakingCurrency (r:1 w:0)
Storage: Tokens TotalIssuance (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:6 w:6)
Storage: System Account (r:4 w:3)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:0)
Storage: Dex TradingPairStatuses (r:3 w:0)
Storage: Dex LiquidityPool (r:2 w:2)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 428.7
µs

Reads = 30
Writes = 16

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 428.7
µs

Reads = 30
Writes = 16

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 170.6
µs

Reads = 13
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 170.6
µs

Reads = 13
Writes = 8

Acala Benchmarking Bot and others added 2 commits November 16, 2021 05:20
…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
@ferrell-code
Copy link
Contributor Author

/bench runtime mandala module_cdp_engine

@ghost
Copy link

ghost commented Nov 16, 2021

Finished benchmark for branch: fer-cdp-treasury-bench

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_cdp_engine --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/

Results

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

Storage: CdpEngine LastAccumulationSecs (r:1 w:1)
Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: CdpEngine CollateralParams (r:3 w:0)
Storage: CdpEngine GlobalInterestRatePerSec (r:1 w:0)
Storage: Loans TotalPositions (r:3 w:0)
Storage: Timestamp Now (r:0 w:1)
Storage: CdpEngine DebitExchangeRate (r:1 w:1)
Storage: Tokens Accounts (r:1 w:1)
Storage: Tokens TotalIssuance (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 46.41
+ c 46.26
µs

Reads = 9 + (2 * c)
Writes = 2 + (2 * c)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
0 45.66 0.119 0.2%
1 101.4 0.624 0.6%
2 138.3 0.618 0.4%

Quality and confidence:
param error
c 1.035

Model:
Time ~= 48.8
+ c 46.35
µs

Reads = 9 + (2 * c)
Writes = 2 + (2 * c)

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

Storage: CdpEngine CollateralParams (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 56.88
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 56.88
µs

Reads = 1
Writes = 1

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

Storage: CdpEngine GlobalInterestRatePerSec (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 19.25
µs

Reads = 0
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 19.25
µs

Reads = 0
Writes = 1

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:3 w:3)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:1)
Storage: Dex TradingPairStatuses (r:1 w:0)
Storage: Dex LiquidityPool (r:1 w:0)
Storage: CdpTreasury ExpectedCollateralAuctionSize (r:1 w:0)
Storage: AuctionManager TotalTargetInAuction (r:1 w:1)
Storage: Auction AuctionsIndex (r:1 w:1)
Storage: AuctionManager CollateralAuctions (r:0 w:1)
Storage: Auction AuctionEndTime (r:0 w:1)
Storage: Auction Auctions (r:0 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 263.1
+ b 29.63
µs

Reads = 23 + (0 * b)
Writes = 16 + (3 * b)

Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
1 275.9 0.644 0.2%
2 305.6 1.407 0.4%
3 365.9 4.271 1.1%
4 369.3 7.772 2.1%
5 394.1 4.932 1.2%
6 451.5 1.343 0.2%
7 480.5 1.918 0.3%
8 481.6 2.191 0.4%
9 538.1 1.595 0.2%
10 534.4 1.772 0.3%
11 592.8 1.328 0.2%
12 622.8 3.167 0.5%
13 657.2 3.193 0.4%
14 686.5 4.926 0.7%
15 714.6 5.39 0.7%
16 711.5 0.755 0.1%
17 771.8 2.742 0.3%
18 798.6 4.196 0.5%
19 828.3 2.961 0.3%
20 829.1 2.915 0.3%
21 884.7 2.09 0.2%
22 916.6 3.715 0.4%
23 945.2 4.129 0.4%
24 976.8 4.957 0.5%
25 977 5.907 0.6%
26 1045 8.933 0.8%
27 1062 1.935 0.1%
28 1097 7.451 0.6%
29 1121 4.081 0.3%
30 1158 5.731 0.4%
31 1182 7.718 0.6%
32 1184 4.808 0.4%
33 1243 4.344 0.3%
34 1274 3.966 0.3%
35 1302 5.294 0.4%
36 1337 7.28 0.5%
37 1375 6.732 0.4%
38 1392 5.172 0.3%
39 1420 4.433 0.3%
40 1421 7.295 0.5%
41 1477 5.645 0.3%
42 1508 4.747 0.3%
43 1532 4.471 0.2%
44 1564 5.72 0.3%
45 1594 5.915 0.3%
46 1625 5.952 0.3%
47 1658 4.257 0.2%
48 1682 5.629 0.3%
49 1722 12.6 0.7%
50 1718 4.412 0.2%
51 1770 3.756 0.2%
52 1836 26.11 1.4%
53 1827 3.506 0.1%
54 1866 6.388 0.3%
55 1896 6.299 0.3%
56 1918 4.984 0.2%
57 1946 5.553 0.2%
58 1973 9.24 0.4%
59 2017 9.102 0.4%
60 2034 3.741 0.1%
61 2064 3.578 0.1%
62 2102 7.255 0.3%
63 2119 5.611 0.2%
64 2127 4.959 0.2%
65 2184 3.784 0.1%
66 2214 5.712 0.2%
67 2242 3.665 0.1%
68 2283 15.23 0.6%
69 2313 5.75 0.2%
70 2358 7.107 0.3%
71 2374 3.98 0.1%
72 2400 2.544 0.1%
73 2429 7.489 0.3%
74 2455 5.136 0.2%
75 2492 4.036 0.1%
76 2998 347.5 11.5%
77 2547 4.517 0.1%
78 2578 3.656 0.1%
79 3323 440.1 13.2%
80 2604 3.231 0.1%
81 2668 6.16 0.2%
82 2695 3.563 0.1%
83 2726 5.377 0.1%
84 2764 5.089 0.1%
85 2785 5.039 0.1%
86 2803 3.381 0.1%
87 2849 4.447 0.1%
88 2878 2.238 0.0%
89 2884 2.385 0.0%
90 2932 4.313 0.1%
91 3425 164.5 4.8%
92 3742 631.9 16.8%
93 3019 6.124 0.2%
94 3043 4.278 0.1%
95 3067 3.761 0.1%
96 3101 4.095 0.1%
97 3124 5.457 0.1%
98 3158 4.447 0.1%
99 3186 3.609 0.1%
100 3263 78.34 2.4%

Quality and confidence:
param error
b 0.161

Model:
Time ~= 233.9
+ b 30.66
µs

Reads = 23 + (0 * b)
Writes = 15 + (3 * b)

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: AcalaOracle IsUpdated (r:1 w:0)
Storage: AcalaOracle Values (r:1 w:0)
Storage: StakingPool StakingPoolLedger (r:1 w:0)
Storage: Tokens TotalIssuance (r:1 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: CdpEngine CollateralParams (r:1 w:0)
Storage: Tokens Accounts (r:6 w:6)
Storage: System Account (r:4 w:3)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)
Storage: AuctionManager TotalCollateralInAuction (r:1 w:0)
Storage: Dex TradingPairStatuses (r:1 w:0)
Storage: Dex LiquidityPool (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 381.5
µs

Reads = 27
Writes = 15

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 381.5
µs

Reads = 27
Writes = 15

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

Storage: EmergencyShutdown IsShutdown (r:1 w:0)
Storage: Loans Positions (r:1 w:1)
Storage: Prices LockedPrice (r:2 w:0)
Storage: CdpEngine DebitExchangeRate (r:1 w:0)
Storage: Tokens Accounts (r:2 w:2)
Storage: System Account (r:2 w:1)
Storage: CdpTreasury DebitPool (r:1 w:1)
Storage: Rewards SharesAndWithdrawnRewards (r:1 w:1)
Storage: Rewards PoolInfos (r:1 w:1)
Storage: Loans TotalPositions (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 162.5
µs

Reads = 13
Writes = 8

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 162.5
µs

Reads = 13
Writes = 8

…hmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_cdp_engine --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
xlc
xlc previously approved these changes Nov 16, 2021
modules/cdp-engine/src/lib.rs Show resolved Hide resolved
modules/cdp-engine/src/lib.rs Outdated Show resolved Hide resolved
@xlc
Copy link
Member

xlc commented Nov 16, 2021

can you do a follow up PR to reduce MaxAuctionsCount to 50? just to reduce the weight of worse case scenario
for 10M liquidation (which will means we have some other issue to deal with), each auction size will be 200k, which is still reasonably small.

@ferrell-code
Copy link
Contributor Author

At 10M liquidation I think a lot of people have issues to deal with 😄, makes sense

@ferrell-code ferrell-code merged commit 9e11916 into master Nov 17, 2021
@ferrell-code ferrell-code deleted the fer-cdp-treasury-bench branch November 17, 2021 18:03
syan095 pushed a commit that referenced this pull request Nov 20, 2021
…edeem-match

* origin/master:
  Add more test cases (#1620)
  bump (#1622)
  update protocolId and bootnode
  Fixed a redeem bug and added more Homa lite tests (#1619)
  Add module asset registry (#1598)
  MaxAuctions count to 50 (#1617)
  Cdp Treasury Bench update (#1609)
  Bump @openzeppelin/contracts from 4.3.2 to 4.3.3 in /ts-tests (#1612)

# Conflicts:
#	modules/homa-lite/src/lib.rs
#	modules/homa-lite/src/tests_no_fees.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.

2 participants