Add new hardware and software metrics (#11062)

* Add new hardware and software metrics

* Move sysinfo tests into `mod tests`

* Correct a typo in a comment

* Remove unnecessary `nix` dependency

* Fix the version tests

* Add a `--disable-hardware-benchmarks` CLI argument

* Disable hardware benchmarks in the integration tests

* Remove unused import

* Fix benchmarks compilation

* Move code to a new `sc-sysinfo` crate

* Correct `impl_version` comment

* Move `--disable-hardware-benchmarks` to the chain-specific bin crate

* Move printing out of hardware bench results to `sc-sysinfo`

* Move hardware benchmarks to a separate messages; trigger them manually

* Rename some of the fields in the `HwBench` struct

* Revert changes to the telemetry crate; manually send hwbench messages

* Move sysinfo logs into the sysinfo crate

* Move the `TARGET_OS_*` constants into the sysinfo crate

* Minor cleanups

* Move the `HwBench` struct to the sysinfo crate

* Derive `Clone` for `HwBench`

* Fix broken telemetry connection notification stream

* Prevent the telemetry connection notifiers from leaking if they're disconnected

* Turn the telemetry notification failure log into a debug log

* Rename `--disable-hardware-benchmarks` to `--no-hardware-benchmarks`
This commit is contained in:
Koute
2022-04-11 18:46:53 +09:00
committed by GitHub
parent f517e57f67
commit 8351ada6a3
29 changed files with 808 additions and 63 deletions
+21 -9
View File
@@ -2842,12 +2842,6 @@ dependencies = [
"crunchy",
]
[[package]]
name = "hashbrown"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
[[package]]
name = "hashbrown"
version = "0.11.2"
@@ -3179,12 +3173,12 @@ dependencies = [
[[package]]
name = "indexmap"
version = "1.6.2"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
dependencies = [
"autocfg 1.0.1",
"hashbrown 0.9.1",
"hashbrown 0.11.2",
"serde",
]
@@ -4863,6 +4857,7 @@ dependencies = [
"sc-service",
"sc-service-test",
"sc-sync-state-rpc",
"sc-sysinfo",
"sc-telemetry",
"sc-transaction-pool",
"sc-transaction-pool-api",
@@ -9002,6 +8997,7 @@ dependencies = [
"sc-offchain",
"sc-rpc",
"sc-rpc-server",
"sc-sysinfo",
"sc-telemetry",
"sc-tracing",
"sc-transaction-pool",
@@ -9106,6 +9102,22 @@ dependencies = [
"thiserror",
]
[[package]]
name = "sc-sysinfo"
version = "6.0.0-dev"
dependencies = [
"futures 0.3.19",
"libc",
"log 0.4.14",
"rand 0.7.3",
"rand_pcg 0.2.1",
"regex",
"sc-telemetry",
"serde",
"serde_json",
"sp-core",
]
[[package]]
name = "sc-telemetry"
version = "4.0.0-dev"