mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 06:21:02 +00:00
[polkadot-staging] Bump sysinfo from 0.29.11 to 0.30.5 (#2790)
* Bump sysinfo from 0.29.11 to 0.30.5 Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.11 to 0.30.5. - [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md) - [Commits](https://github.com/GuillaumeGomez/sysinfo/commits) --- updated-dependencies: - dependency-name: sysinfo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix build --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
a4ba9a0800
commit
37bb1e7909
@@ -21,7 +21,7 @@ jsonpath_lib = "0.3"
|
|||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
sysinfo = "0.29"
|
sysinfo = "0.30"
|
||||||
time = { version = "0.3", features = ["formatting", "local-offset", "std"] }
|
time = { version = "0.3", features = ["formatting", "local-offset", "std"] }
|
||||||
tokio = { version = "1.35", features = ["rt"] }
|
tokio = { version = "1.35", features = ["rt"] }
|
||||||
thiserror = "1.0.55"
|
thiserror = "1.0.55"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ use crate::metrics::{
|
|||||||
use async_std::sync::{Arc, Mutex};
|
use async_std::sync::{Arc, Mutex};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use sysinfo::{ProcessExt, RefreshKind, System, SystemExt};
|
use sysinfo::{RefreshKind, System};
|
||||||
|
|
||||||
/// Global metrics update interval.
|
/// Global metrics update interval.
|
||||||
const UPDATE_INTERVAL: Duration = Duration::from_secs(10);
|
const UPDATE_INTERVAL: Duration = Duration::from_secs(10);
|
||||||
@@ -73,7 +73,7 @@ impl StandaloneMetric for GlobalMetrics {
|
|||||||
async fn update(&self) {
|
async fn update(&self) {
|
||||||
// update system-wide metrics
|
// update system-wide metrics
|
||||||
let mut system = self.system.lock().await;
|
let mut system = self.system.lock().await;
|
||||||
let load = system.load_average();
|
let load = sysinfo::System::load_average();
|
||||||
self.system_average_load.with_label_values(&["1min"]).set(load.one);
|
self.system_average_load.with_label_values(&["1min"]).set(load.one);
|
||||||
self.system_average_load.with_label_values(&["5min"]).set(load.five);
|
self.system_average_load.with_label_values(&["5min"]).set(load.five);
|
||||||
self.system_average_load.with_label_values(&["15min"]).set(load.fifteen);
|
self.system_average_load.with_label_values(&["15min"]).set(load.fifteen);
|
||||||
|
|||||||
Reference in New Issue
Block a user