Add hardware benchmark telemetry (Companion for Substrate#11062) (#5206)

* Align to changes in Substrate

* Align to the newest changes in substrate

* Rename `--disable-hardware-benchmarks` to `--no-hardware-benchmarks`

* Fix `polkadot-test-service` compilation

* Fix compilation of test parachains
This commit is contained in:
Koute
2022-04-26 18:16:31 +09:00
committed by GitHub
parent 7a92f1678d
commit b049d4f1c9
11 changed files with 49 additions and 0 deletions
+10
View File
@@ -302,6 +302,15 @@ where
};
runner.run_node_until_exit(move |config| async move {
let hwbench = if !cli.run.no_hardware_benchmarks {
config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(&database_path);
sc_sysinfo::gather_hwbench(Some(database_path))
})
} else {
None
};
let role = config.role.clone();
match role {
@@ -315,6 +324,7 @@ where
None,
false,
overseer_gen,
hwbench,
)
.map(|full| full.task_manager)
.map_err(Into::into),