From b82ccb98359154f3b3d05327edfd1a16d9cf1613 Mon Sep 17 00:00:00 2001 From: Diva M Date: Sun, 10 Nov 2024 22:05:21 -0500 Subject: [PATCH] attempt to remove iroh-relay feature flag usage --- Cargo.lock | 1 - iroh-net/bench/Cargo.toml | 1 - iroh-net/bench/src/bin/bulk.rs | 2 +- iroh-net/src/metrics.rs | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5591a0b2c0..cc2528fb11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3075,7 +3075,6 @@ dependencies = [ "iroh-metrics", "iroh-net", "iroh-quinn", - "iroh-relay", "rcgen", "rustls", "socket2", diff --git a/iroh-net/bench/Cargo.toml b/iroh-net/bench/Cargo.toml index 012c8c0344..58fb8f49d2 100644 --- a/iroh-net/bench/Cargo.toml +++ b/iroh-net/bench/Cargo.toml @@ -20,7 +20,6 @@ tracing = "0.1" tracing-subscriber = { version = "0.3.0", default-features = false, features = ["env-filter", "fmt", "ansi", "time", "local-time"] } socket2 = "0.5" futures-lite = "2.3.0" -iroh-relay = { path = "../../iroh-relay", features = ["metrics"] } [features] default = ["local-relay"] diff --git a/iroh-net/bench/src/bin/bulk.rs b/iroh-net/bench/src/bin/bulk.rs index efac79f672..e5280198b2 100644 --- a/iroh-net/bench/src/bin/bulk.rs +++ b/iroh-net/bench/src/bin/bulk.rs @@ -40,7 +40,7 @@ pub fn run_iroh(opt: Opt) -> Result<()> { metrics.insert(iroh_net::metrics::PortmapMetrics::new(reg)); #[cfg(feature = "local-relay")] if opt.with_relay { - metrics.insert(iroh_relay::server::Metrics::new(reg)); + metrics.insert(iroh_net::metrics::RelayMetrics::new(reg)); } })?; } diff --git a/iroh-net/src/metrics.rs b/iroh-net/src/metrics.rs index 8274899e73..655cfe4476 100644 --- a/iroh-net/src/metrics.rs +++ b/iroh-net/src/metrics.rs @@ -1,6 +1,6 @@ //! Co-locating all of the iroh-net metrics structs -#[cfg(feature = "iroh-relay")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "iroh-relay")))] +#[cfg(feature = "test-utils")] +#[cfg_attr(iroh_docsrs, doc(cfg(feature = "test-utils")))] pub use iroh_relay::server::Metrics as RelayMetrics; pub use portmapper::Metrics as PortmapMetrics;