Skip to content

Commit

Permalink
[polkadot-staging] Bump sysinfo from 0.29.11 to 0.30.5 (paritytech#2790)
Browse files Browse the repository at this point in the history
* 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] <[email protected]>

* Fix build

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
serban300 and dependabot[bot] authored Jan 8, 2024
1 parent c3436b2 commit 6e526c3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
45 changes: 26 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relays/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jsonpath_lib = "0.3"
log = "0.4.20"
num-traits = "0.2"
serde_json = "1.0"
sysinfo = "0.29"
sysinfo = "0.30"
time = { version = "0.3", features = ["formatting", "local-offset", "std"] }
tokio = { version = "1.35", features = ["rt"] }
thiserror = "1.0.55"
Expand Down
4 changes: 2 additions & 2 deletions relays/utils/src/metrics/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::metrics::{
use async_std::sync::{Arc, Mutex};
use async_trait::async_trait;
use std::time::Duration;
use sysinfo::{ProcessExt, RefreshKind, System, SystemExt};
use sysinfo::{RefreshKind, System};

/// Global metrics update interval.
const UPDATE_INTERVAL: Duration = Duration::from_secs(10);
Expand Down Expand Up @@ -73,7 +73,7 @@ impl StandaloneMetric for GlobalMetrics {
async fn update(&self) {
// update system-wide metrics
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(&["5min"]).set(load.five);
self.system_average_load.with_label_values(&["15min"]).set(load.fifteen);
Expand Down

0 comments on commit 6e526c3

Please sign in to comment.