difftreelog
feat enable split benchmarks
in: master
1 file changed
runtime/src/lib.rsdiffbeforeafterboth124712471248 #[cfg(feature = "runtime-benchmarks")]1248 #[cfg(feature = "runtime-benchmarks")]1249 impl frame_benchmarking::Benchmark<Block> for Runtime {1249 impl frame_benchmarking::Benchmark<Block> for Runtime {1250 fn benchmark_metadata(extra: bool) -> (1251 Vec<frame_benchmarking::BenchmarkList>,1252 Vec<frame_support::traits::StorageInfo>,1253 ) {1254 use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};1255 use frame_support::traits::StorageInfoTrait;12561257 let mut list = Vec::<BenchmarkList>::new();12581259 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);1260 list_benchmark!(list, extra, pallet_nft, Nft);1261 list_benchmark!(list, extra, pallet_inflation, Inflation);1262 list_benchmark!(list, extra, pallet_fungible, Fungible);1263 list_benchmark!(list, extra, pallet_refungible, Refungible);1264 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);12651266 let storage_info = AllPalletsWithSystem::storage_info();12671268 return (list, storage_info)1269 }12701250 fn dispatch_benchmark(1271 fn dispatch_benchmark(1251 config: frame_benchmarking::BenchmarkConfig1272 config: frame_benchmarking::BenchmarkConfig1252 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {1273 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {1253 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};1274 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};125412751255 let whitelist: Vec<TrackedStorageKey> = vec![1276 let whitelist: Vec<TrackedStorageKey> = vec![1256 // Alice account1277 // Block Number1257 hex_literal::hex!("d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d").to_vec().into(),1278 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),1258 // // Total Issuance1279 // Total Issuance1259 // hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),1280 hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),1260 // // Execution Phase1281 // Execution Phase1261 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),1282 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),1262 // // Event Count1283 // Event Count1263 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),1284 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),1264 // // System Events1285 // System Events1265 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),1286 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),1266 ];1287 ];126712881268 let mut batches = Vec::<BenchmarkBatch>::new();1289 let mut batches = Vec::<BenchmarkBatch>::new();1271 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1292 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1272 add_benchmark!(params, batches, pallet_nft, Nft);1293 add_benchmark!(params, batches, pallet_nft, Nft);1273 add_benchmark!(params, batches, pallet_inflation, Inflation);1294 add_benchmark!(params, batches, pallet_inflation, Inflation);1295 add_benchmark!(params, batches, pallet_fungible, Fungible);1296 add_benchmark!(params, batches, pallet_refungible, Refungible);1297 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);127412981275 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }1299 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }1276 Ok(batches)1300 Ok(batches)