feat: 🔊 Add CPUs log at startup (#372)

Adds a log at the startup of the node to show the number of logical CPUs
available to use for parallelism.
This commit is contained in:
Facundo Farall 2026-01-02 08:52:23 -03:00 committed by GitHub
parent c401278ea9
commit 5310ce63a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -388,6 +388,13 @@ pub fn run() -> sc_cli::Result<()> {
));
};
if let Some(logical_cpus) = std::thread::available_parallelism().map(|n| n.get()).ok() {
log::info!(
"💻 DataHaven node starting with {} logical CPU(s) visible to the process",
logical_cpus
);
}
runner.run_node_until_exit(|config| async move {
let sealing_mode = match (cli.sealing, config.chain_spec.chain_type()) {
(Some(mode), ChainType::Development) => Some(mode),

View file

@ -202,7 +202,7 @@ where
let signers = Vec::new();
let pending_consensus_data_provider: Option<
Box<(dyn fc_rpc::pending::ConsensusDataProvider<_>)>,
Box<dyn fc_rpc::pending::ConsensusDataProvider<_>>,
> = Some(BabeConsensusDataProvider::new().into());
let pending_create_inherent_data_providers = move |_, _| async move {