Skip to content

Commit

Permalink
drop stale counters
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Jul 22, 2024
1 parent ef259dc commit d82dce5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 59 deletions.
2 changes: 0 additions & 2 deletions iroh-dns-server/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use struct_iterable::Iterable;
pub struct Metrics {
pub pkarr_publish_update: Counter,
pub pkarr_publish_noop: Counter,
// pub pkarr_publish_error: Counter,
pub dns_requests: Counter,
pub dns_requests_udp: Counter,
pub dns_requests_https: Counter,
Expand All @@ -32,7 +31,6 @@ impl Default for Metrics {
pkarr_publish_noop: Counter::new(
"Number of pkarr relay puts that did not update the state",
),
// pkarr_publish_error: Counter::new("Number of pkarr relay puts that failed"),
dns_requests: Counter::new("DNS requests (total)"),
dns_requests_udp: Counter::new("DNS requests via UDP"),
dns_requests_https: Counter::new("DNS requests via HTTPS (DoH)"),
Expand Down
4 changes: 0 additions & 4 deletions iroh-gossip/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ pub struct Metrics {
pub msgs_ctrl_recv_size: Counter,
pub neighbor_up: Counter,
pub neighbor_down: Counter,
// pub topics_joined: Counter,
// pub topics_left: Counter,
pub actor_tick_main: Counter,
pub actor_tick_rx: Counter,
pub actor_tick_endpoint: Counter,
Expand All @@ -44,8 +42,6 @@ impl Default for Metrics {
msgs_ctrl_recv_size: Counter::new("Total size of all control messages received"),
neighbor_up: Counter::new("Number of times we connected to a peer"),
neighbor_down: Counter::new("Number of times we disconnected from a peer"),
// topics_joined: Counter::new("Number of times we joined a topic"),
// topics_left: Counter::new("Number of times we left a topic"),
actor_tick_main: Counter::new("Number of times the main actor loop ticked"),
actor_tick_rx: Counter::new("Number of times the actor ticked for a message received"),
actor_tick_endpoint: Counter::new(
Expand Down
18 changes: 0 additions & 18 deletions iroh-net/src/magicsock/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ use iroh_metrics::{
#[allow(missing_docs)]
#[derive(Debug, Clone, Iterable)]
pub struct Metrics {
// pub rebind_calls: Counter,
pub re_stun_calls: Counter,
pub update_direct_addrs: Counter,

// Sends (data or disco)
// pub send_relay_queued: Counter,
// pub send_relay_error_chan: Counter,
// pub send_relay_error_closed: Counter,
// pub send_relay_error_queue: Counter,
pub send_ipv4: Counter,
// pub send_ipv4_error: Counter,
pub send_ipv6: Counter,
// pub send_ipv6_error: Counter,
pub send_relay: Counter,
pub send_relay_error: Counter,

Expand All @@ -40,7 +33,6 @@ pub struct Metrics {
pub sent_disco_ping: Counter,
pub sent_disco_pong: Counter,
pub sent_disco_call_me_maybe: Counter,
// pub recv_disco_bad_peer: Counter,
pub recv_disco_bad_key: Counter,
pub recv_disco_bad_parse: Counter,

Expand All @@ -49,7 +41,6 @@ pub struct Metrics {
pub recv_disco_ping: Counter,
pub recv_disco_pong: Counter,
pub recv_disco_call_me_maybe: Counter,
// pub recv_disco_call_me_maybe_bad_node: Counter,
pub recv_disco_call_me_maybe_bad_disco: Counter,

// How many times our relay home node DI has changed from non-zero to a different non-zero.
Expand Down Expand Up @@ -84,19 +75,12 @@ impl Default for Metrics {
num_relay_conns_added: Counter::new("num_relay_conns added"),
num_relay_conns_removed: Counter::new("num_relay_conns removed"),

// rebind_calls: Counter::new("rebind_calls"),
re_stun_calls: Counter::new("restun_calls"),
update_direct_addrs: Counter::new("update_endpoints"),

// Sends (data or disco)
// send_relay_queued: Counter::new("send_relay_queued"),
// send_relay_error_chan: Counter::new("send_relay_error_chan"),
// send_relay_error_closed: Counter::new("send_relay_error_closed"),
// send_relay_error_queue: Counter::new("send_relay_error_queue"),
send_ipv4: Counter::new("send_ipv4"),
// send_ipv4_error: Counter::new("send_ipv4_error"),
send_ipv6: Counter::new("send_ipv6"),
// send_ipv6_error: Counter::new("send_ipv6_error"),
send_relay: Counter::new("send_relay"),
send_relay_error: Counter::new("send_relay_error"),

Expand All @@ -116,7 +100,6 @@ impl Default for Metrics {
sent_disco_ping: Counter::new("disco_sent_ping"),
sent_disco_pong: Counter::new("disco_sent_pong"),
sent_disco_call_me_maybe: Counter::new("disco_sent_callmemaybe"),
// recv_disco_bad_peer: Counter::new("disco_recv_bad_peer"),
recv_disco_bad_key: Counter::new("disco_recv_bad_key"),
recv_disco_bad_parse: Counter::new("disco_recv_bad_parse"),

Expand All @@ -125,7 +108,6 @@ impl Default for Metrics {
recv_disco_ping: Counter::new("disco_recv_ping"),
recv_disco_pong: Counter::new("disco_recv_pong"),
recv_disco_call_me_maybe: Counter::new("disco_recv_callmemaybe"),
// recv_disco_call_me_maybe_bad_node: Counter::new("disco_recv_callmemaybe_bad_node"),
recv_disco_call_me_maybe_bad_disco: Counter::new("disco_recv_callmemaybe_bad_disco"),

// How many times our relay home node DI has changed from non-zero to a different non-zero.
Expand Down
2 changes: 0 additions & 2 deletions iroh-net/src/netcheck/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub struct Metrics {
pub stun_packets_recv_ipv6: Counter,
pub reports: Counter,
pub reports_full: Counter,
// pub reports_error: Counter,
}

impl Default for Metrics {
Expand All @@ -29,7 +28,6 @@ impl Default for Metrics {
stun_packets_recv_ipv6: Counter::new("Number of IPv6 STUN packets received"),
reports: Counter::new("Number of reports executed by netcheck, including full reports"),
reports_full: Counter::new("Number of full reports executed by netcheck"),
// reports_error: Counter::new("Number of executed reports resulting in an error"),
}
}
}
Expand Down
33 changes: 6 additions & 27 deletions iroh-net/src/relay/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,16 @@ pub struct Metrics {
/// Packets of other `FrameType`s dropped
pub other_packets_dropped: Counter,

// /// Number of packets we have forwarded out to another packet forwarder
// pub packets_forwarded_out: Counter,
// /// Number of packets we have been asked to forward
// pub packets_forwarded_in: Counter,
/// Number of `FrameType::Ping`s received
pub got_ping: Counter,
/// Number of `FrameType::Pong`s sent
pub sent_pong: Counter,
/// Number of `FrameType::Unknown` received
pub unknown_frames: Counter,

// /*
// * Metrics about peers
// */
// /// Number of packet forwarders added
// pub added_pkt_fwder: Counter,
// /// Number of packet forwarders removed
// pub removed_pkt_fwder: Counter,
/*
* Metrics about peers
*/
/// Number of connections we have accepted
pub accepts: Counter,
/// Number of connections we have removed because of an error
Expand Down Expand Up @@ -94,26 +86,13 @@ impl Default for Metrics {
other_packets_dropped: Counter::new(
"Number of times a non-disco, non-'send; packet was dropped.",
),

// packets_forwarded_out: Counter::new(
// "Number of times the server has sent a forwarded packet",
// ),
// packets_forwarded_in: Counter::new(
// "Number of times the server has received a forwarded packet.",
// ),
got_ping: Counter::new("Number of times the server has received a Ping from a client."),
sent_pong: Counter::new("Number of times the server has sent a Pong to a client."),
unknown_frames: Counter::new("Number of unknown frames sent to this server."),

// /*
// * Metrics about peers
// */
// added_pkt_fwder: Counter::new(
// "Number of times a packeted forwarded was added to this server.",
// ),
// removed_pkt_fwder: Counter::new(
// "Number of times a packet forwarded was removed to this server.",
// ),
/*
* Metrics about peers
*/
accepts: Counter::new("Number of times this server has accepted a connection."),
disconnects: Counter::new("Number of clients that have then disconnected."),

Expand Down
6 changes: 0 additions & 6 deletions iroh/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use crate::rpc_protocol::node::CounterStats;
#[allow(missing_docs)]
#[derive(Debug, Clone, Iterable)]
pub struct Metrics {
// pub requests_total: Counter,
// pub bytes_sent: Counter,
// pub bytes_received: Counter,
pub doc_gossip_tick_main: Counter,
pub doc_gossip_tick_event: Counter,
pub doc_gossip_tick_actor: Counter,
Expand All @@ -30,9 +27,6 @@ pub struct Metrics {
impl Default for Metrics {
fn default() -> Self {
Self {
// requests_total: Counter::new("Total number of requests received"),
// bytes_sent: Counter::new("Number of bytes streamed"),
// bytes_received: Counter::new("Number of bytes received"),
doc_gossip_tick_main: Counter::new("Number of times the main gossip actor loop ticked"),
doc_gossip_tick_event: Counter::new(
"Number of times the gossip actor ticked for an event",
Expand Down

0 comments on commit d82dce5

Please sign in to comment.