Skip to content

Commit

Permalink
WIP: disable certain benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen committed Jul 17, 2024
1 parent 3d3facb commit cbceec7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions node/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
benchmarking::{inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder},
//benchmarking::{inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder},
chain_spec,
cli::{Cli, Subcommand},
service::{self, FullClient},
Expand All @@ -8,10 +8,10 @@ use crate::{
use polkadot_sdk::*;

use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use frame_benchmarking_cli::ExtrinsicFactory;
//use frame_benchmarking_cli::ExtrinsicFactory;
use sc_cli::SubstrateCli;
use sc_service::PartialComponents;
use sp_keyring::Sr25519Keyring;
//use sp_keyring::Sr25519Keyring;
use sp_runtime::traits::HashingFor;

use time_primitives::{AccountId, Balance, Block, Nonce};
Expand Down Expand Up @@ -84,6 +84,7 @@ impl SubstrateCli for Cli {
}
}

#[allow(clippy::extra_unused_type_parameters)]
/// Parse command line arguments into service configuration.
pub fn run_with<Runtime, RuntimeApi>(cli: Cli) -> sc_cli::Result<()>
where
Expand Down Expand Up @@ -150,7 +151,7 @@ where

cmd.run(config, partial.client, db, storage)
},
BenchmarkCmd::Overhead(cmd) => {
/*BenchmarkCmd::Overhead(cmd) => {
// ensure that we keep the task manager alive
let partial = service::new_partial::<RuntimeApi>(&config)?;
let ext_builder = RemarkBuilder::<Runtime, RuntimeApi>::new(partial.client.clone());
Expand Down Expand Up @@ -183,10 +184,11 @@ where
Vec::new(),
&ext_factory,
)
},
},*/
BenchmarkCmd::Machine(cmd) => {
cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())
},
_ => todo!("Does not compile at the moment"),
}
})
},
Expand Down
2 changes: 1 addition & 1 deletion node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mod chain_spec;
#[macro_use]
mod service;
mod benchmarking;
//mod benchmarking;
mod cli;
mod command;
mod rpc;
Expand Down

0 comments on commit cbceec7

Please sign in to comment.