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

Add benchmark for balances #342

Merged
merged 5 commits into from
Mar 16, 2020
Merged

Add benchmark for balances #342

merged 5 commits into from
Mar 16, 2020

Conversation

clearloop
Copy link
Contributor

@clearloop clearloop commented Mar 13, 2020

This benchmark demand is original from #123, and relate to #323, we can review weights while benchmarking.

Steps

  • add benchmark command
  • add benchmark for balances
    • skip kton, because it is as same as ring.
  • patch docs for balances.
    • check the weight of balances

Refs

  1. benchmarking command in substrate
  2. benchmarking in substrate's balances
  3. calcuating weights in substrate

@clearloop clearloop self-assigned this Mar 13, 2020
@clearloop
Copy link
Contributor Author

clearloop commented Mar 13, 2020

Preview

 𝝺 ./target/debug/darwinia benchmark --extrinsic transfer --pallet ring
Pallet: "ring", Extrinsic: "transfer", Steps: [], Repeat: 1
u,e,extrinsic_time,storage_root_time
1,1000,5345000,1303000
100,1000,2984000,832000
199,1000,3037000,771000
298,1000,2165000,574000
397,1000,2062000,599000
496,1000,2045000,571000
595,1000,2207000,680000
694,1000,2089000,603000
793,1000,2354000,573000
892,1000,3013000,837000
991,1000,4462000,679000
1000,2,3918000,683000
1000,101,2369000,592000
1000,200,2401000,575000
1000,299,2397000,660000
1000,398,2436000,660000
1000,497,2779000,593000
1000,596,2105000,572000
1000,695,2551000,753000
1000,794,2474000,586000
1000,893,2950000,849000
1000,992,3158000,848000
Done.

The second column extrinsic_time is the weight we calculated out exactly, and the fee can be converted from these values.

bin/node/runtime/src/lib.rs Outdated Show resolved Hide resolved
@hackfisher hackfisher merged commit f7f761b into darwinia-network:develop Mar 16, 2020
@clearloop clearloop deleted the benchmark-balances branch March 18, 2020 07:49
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.

3 participants