-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix(pswap-distribution): add pool and liquidity of TBCD for benchmark #1092
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benches are run by 2 ways:
- As unit tests
- As benchmarking process
Please test both scenarios:
To run as unit test:
cargo test --features private-net,wip,ready-to-test,runtime-benchmarks
To run as benchmarks:
mkdir benches
cargo run --release --bin framenode --features private-net,runtime-benchmarks benchmark pallet --chain=local --execution=wasm --wasm-execution=compiled --pallet pswap-distribution --extrinsic "*" --steps 50 --repeat 20 --output ./benches
All passes. Tests: ❯ cargo test --features private-net,wip,ready-to-test,runtime-benchmarks
# Bunch of test lines...
Doc-tests xst-benchmarking
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
❯ echo $?
0 Benchmarks: ❯ cargo run --release --bin framenode --features private-net,runtime-benchmarks benchmark pallet --chain=local --execution=wasm --wasm-execution=compiled --pallet pswap-distribution --extrinsic "*" --steps 50 --repeat 20 --output ./benches
# Benchmark logs...
Quality and confidence:
param error
a 0.151
b 0.774
c 0.081
Model:
Time ~= 339.7
+ a 4.746
+ b 273.7
+ c 6.805
µs
Reads = 123 + (1 * a) + (0 * b) + (1 * c)
Writes = 91 + (0 * a) + (0 * b) + (0 * c)
Recorded proof Size = 4889 + (248 * a) + (947 * b) + (50 * c)
Created file: "./benches/pswap_distribution.rs"
❯ echo $?
0 By the way I thought one of CIs runs such scenarios 🤷. |
Unit tests - yes, benchmarks - no. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 🎉
Fixes #849. Not sure if my fix is correct as it's my first task after onboarding. Also I'm not sure if feature flags should be changed after this one because benchmarks are running with
--features private-net,runtime-benchmarks,ready-to-test