Giter Site home page Giter Site logo

Comments (20)

seunlanlege avatar seunlanlege commented on June 2, 2024 1

yeah i just added new pallets to the runtime in #40, add benchmarks for them too

from composable.

flipchan avatar flipchan commented on June 2, 2024

What is being benchmarked now:
frame_system
balances
timestamp
oracle
session
collator_selection

from composable.

flipchan avatar flipchan commented on June 2, 2024

todo:
xcm pallet, I will start with this

from composable.

seunlanlege avatar seunlanlege commented on June 2, 2024

check runtime/picasso/src/lb.rs I've added TODOs in the pallets whose WeightInfo needs to be filled

from composable.

flipchan avatar flipchan commented on June 2, 2024

script for running benchmarks:

filip@burko:~/rust/composable$ cat run_b.sh 
#!/bin/bash

echo "enabling Benchmarks"
cargo build --release --features runtime-benchmarks

pallet=frame_system
runtime=picasso
chain=picasso-dev
steps=10
repeat=5

pallets=(
	oracle,
	frame_system,
	balances,
	timestamp.
	session,
	collator_selection
)

echo "Running Benchmarking"

for pall in ${pallets[@]}
do
	./target/release/composable benchmark \
	--chain=$chain \
	--execution=wasm \
	--wasm-execution=compiled \
	--pallet=$pall \
	--extrinsic=* \
	--steps=$steps \
	--repeat=$repeat \
	--raw \
	--output=./runtime/$runtime/src/weights
done 

echo "Benchmarking done"

from composable.

flipchan avatar flipchan commented on June 2, 2024

running script:

 ./run_b.sh 
enabling Benchmarks
    Finished release [optimized] target(s) in 2.41s
Running Benchmarking
2021-08-23 22:11:13 assembling new collators for new session 0 at #0    
2021-08-23 22:11:13 assembling new collators for new session 1 at #0    
Error: Benchmark not found for this pallet.
2021-08-23 22:11:14 assembling new collators for new session 0 at #0    
2021-08-23 22:11:14 assembling new collators for new session 1 at #0    
Error: Benchmark not found for this pallet.
2021-08-23 22:11:15 assembling new collators for new session 0 at #0    
2021-08-23 22:11:15 assembling new collators for new session 1 at #0    
Error: Benchmark not found for this pallet.
2021-08-23 22:11:16 assembling new collators for new session 0 at #0    
2021-08-23 22:11:16 assembling new collators for new session 1 at #0    
Error: Benchmark not found for this pallet.
2021-08-23 22:11:17 assembling new collators for new session 0 at #0    
2021-08-23 22:11:17 assembling new collators for new session 1 at #0    
Error: Benchmark not found for this pallet.
2021-08-23 22:11:18 assembling new collators for new session 0 at #0    
2021-08-23 22:11:18 assembling new collators for new session 1 at #0    
2021-08-23 22:11:20 panicked at 'called `Result::unwrap()` on an `Err` value: <wasm:stripped>', /home/filip/.cargo/git/checkouts/cumulus-59522f43471fa161/ed6ba5d/pallets/collator-selection/src/benchmarking.rs:59:86    
Error: Input("Error executing runtime benchmark: Other(\"Wasm execution trapped: wasm trap: unreachable\\nwasm backtrace:\\n    0: 0x2202 - <unknown>!rust_begin_unwind\\n    1: 0x1fbf - <unknown>!core::panicking::panic_fmt::hec165b0930ecb32e\\n    2: 0x1cf0 - <unknown>!core::result::unwrap_failed::h07848c9b2569f830\\n    3: 0x129dd8 - <unknown>!pallet_collator_selection::benchmarking::register_candidates::h0e76143ad004aa4e\\n    4: 0x12f722 - <unknown>!pallet_collator_selection::benchmarking::<impl frame_benchmarking::utils::Benchmarking<frame_benchmarking::utils::BenchmarkResults> for pallet_collator_selection::pallet::Pallet<T>>::run_benchmark::{{closure}}::hfbef5e6f4ffaa1c9\\n    5: 0x124193 - <unknown>!pallet_collator_selection::benchmarking::<impl frame_benchmarking::utils::Benchmarking<frame_benchmarking::utils::BenchmarkResults> for pallet_collator_selection::pallet::Pallet<T>>::run_benchmark::h8653ffa034b0b937\\n    6: 0xe6559 - <unknown>!<picasso_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>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,u32>,picasso_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion<picasso_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<picasso_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<picasso_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<picasso_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<picasso_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<picasso_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<picasso_runtime::Runtime>)>>>>::dispatch_benchmark::h9ae550026738ecda\\n    7: 0xe3016 - <unknown>!Benchmark_dispatch_benchmark\\nnote: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information\\n\")")
Benchmarking done

still needs improvements, but syntax works for running benchmarks

from composable.

flipchan avatar flipchan commented on June 2, 2024

benchmarks to be added:

  • scheduler
  • collective
  • membership
  • pallet_xcm
  • treasury

from composable.

flipchan avatar flipchan commented on June 2, 2024

current pallets used in runtime:

filip@burko:~/rust/composable/runtime/picasso$ cat Cargo.toml | grep -i Pallet 
| cut -d ' ' -f 1 | uniq                                                                      
aura                                                                                          
authorship                                                                                    
balances                                                                                      
indices                                                                                       
randomness-collective-flip                                                                    
collective                                                                                    
membership                                                                                    
scheduler                                                                                     
session                                                                                       
sudo                                                                                          
timestamp                                                                                     
treasury                                                                                      
democracy                                                                                     
transaction-payment                                                                           
oracle                                                                                        
transaction-payment-rpc-runtime-api                                                           
cumulus-pallet-aura-ext                                                                       
cumulus-pallet-parachain-system                                                               
cumulus-pallet-dmp-queue                                                                      
cumulus-pallet-xcm                                                                            
cumulus-pallet-xcmp-queue                                                                     
collator-selection                                                                            
session-benchmarking                                                                          
pallet-xcm                                                                                    
        "cumulus-pallet-aura-ext/std",                                                        
        "cumulus-pallet-parachain-system/std",                                                
        "cumulus-pallet-xcmp-queue/std",                                                      
        "cumulus-pallet-xcm/std",                                                             
        "pallet-xcm/runtime-benchmarks",                                                      

from composable.

seunlanlege avatar seunlanlege commented on June 2, 2024

you really only want to benchmark pallets that have a Call enum

from composable.

seunlanlege avatar seunlanlege commented on June 2, 2024
  • democracy
  • collator-selection
  • scheduler
  • collective

from composable.

flipchan avatar flipchan commented on June 2, 2024

I'm working on scheduler right now

from composable.

flipchan avatar flipchan commented on June 2, 2024

todo: add the list_benchmark feature

from composable.

flipchan avatar flipchan commented on June 2, 2024

Scheduler pr #43, working from pallets weight and not the local once

from composable.

seunlanlege avatar seunlanlege commented on June 2, 2024

try to add collator-selection, democracy and collective to the same pr

from composable.

flipchan avatar flipchan commented on June 2, 2024

adding democracy, collator-selection and collective now

from composable.

andor0 avatar andor0 commented on June 2, 2024

added pallet-collective and pallet-democracy
PR #46

from composable.

andor0 avatar andor0 commented on June 2, 2024

added pallet-collator-selection
PR #50

from composable.

andor0 avatar andor0 commented on June 2, 2024

writing missing benchmarks for extrinsics of pallet-oracle

from composable.

flipchan avatar flipchan commented on June 2, 2024

@andor0 very nice with the collator-selection!
I got collective and democracy pallet in a branch(https://github.com/ComposableFi/composable/tree/pallet_collective_democracy), will push soon (was a bit slow on the trigger here..)

Great work @andor0 !

from composable.

seunlanlege avatar seunlanlege commented on June 2, 2024

This can now be marked as close

from composable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.