MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / command_worker_hwdetect

Function command_worker_hwdetect

crates/hyperqueue/src/bin/hq.rs:298–316  ·  view source on GitHub ↗
(gsettings: &GlobalSettings, opts: HwDetectOpts)

Source from the content-addressed store, hash-verified

296}
297
298fn command_worker_hwdetect(gsettings: &GlobalSettings, opts: HwDetectOpts) -> anyhow::Result<()> {
299 let mut cpus = detect_cpus()?;
300 if opts.no_hyper_threading {
301 cpus = prune_hyper_threading(&cpus)?;
302 }
303 let mut resources = vec![ResourceDescriptorItem {
304 name: CPU_RESOURCE_NAME.to_string(),
305 kind: cpus,
306 }];
307 detect_additional_resources(
308 &mut resources,
309 &ResourceDetectComponents::All,
310 gather_manager_info(ManagerOpts::Detect)?.as_ref(),
311 )?;
312 gsettings
313 .printer()
314 .print_hw(&ResourceDescriptor::new(resources, Default::default()));
315 Ok(())
316}
317
318async fn command_worker_address(
319 gsettings: &GlobalSettings,

Callers 1

mainFunction · 0.85

Calls 7

detect_cpusFunction · 0.85
prune_hyper_threadingFunction · 0.85
gather_manager_infoFunction · 0.85
as_refMethod · 0.80
printerMethod · 0.80
print_hwMethod · 0.45

Tested by

no test coverage detected