Skip to content

Commit

Permalink
fix(networking): upnp feature gates for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee committed May 30, 2024
1 parent 3f22bfc commit 89e806b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sn_networking/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

use crate::target_arch::sleep;
use libp2p::metrics::{Metrics as Libp2pMetrics, Recorder};
use prometheus_client::{
metrics::{counter::Counter, family::Family, gauge::Gauge},
registry::Registry,
};
#[cfg(feature = "upnp")]
use prometheus_client::metrics::{counter::Counter, family::Family};
use prometheus_client::{metrics::gauge::Gauge, registry::Registry};
use sysinfo::{Pid, ProcessRefreshKind, System};
use tokio::time::Duration;

// Implementation to record `libp2p::upnp::Event` metrics
#[cfg(feature = "upnp")]
mod upnp;

const UPDATE_INTERVAL: Duration = Duration::from_secs(15);
Expand Down

0 comments on commit 89e806b

Please sign in to comment.