fn update_metrics(&self) {
        let num_ready = self.ready_services.len();
        let num_unready = self.unready_services.len();
        let num_peers = num_ready + num_unready;
        metrics::gauge!("pool.num_ready", num_ready as f64);
        metrics::gauge!("pool.num_unready", num_unready as f64);
        metrics::gauge!("zcash.net.peers", num_peers as f64);

        // Security: make sure we haven't exceeded the connection limit
        if num_peers > self.peerset_total_connection_limit {
            let address_metrics = self.address_metrics.borrow();
            panic!(
                "unexpectedly exceeded configured peer set connection limit: \n\
                 peers: {:?}, ready: {:?}, unready: {:?}, \n\
                 address_metrics: {:?}",
                num_peers, num_ready, num_unready, address_metrics,
            );
        }
    }
/// Updates the peer set metrics.
///
/// # Panics
///
/// If the peer set size exceeds the connection limit.
Updates the peer set metrics.
Updates the peer set metrics .
fn update_metrics(&self) {
        let num_ready = self.ready_services.len();
        let num_unready = self.unready_services.len();
        let num_peers = num_ready + num_unready;
        metrics::gauge!("pool.num_ready", num_ready as f64);
        metrics::gauge!("pool.num_unready", num_unready as f64);
        metrics::gauge!("zcash.net.peers", num_peers as f64);
        // Security: make sure we haven't exceeded the connection limit
        if num_peers > self.peerset_total_connection_limit {
            let address_metrics = self.address_metrics.borrow();
            panic!(
                "unexpectedly exceeded configured peer set connection limit: \n\
                 peers: {:?}, ready: {:?}, unready: {:?}, \n\
                 address_metrics: {:?}",
                num_peers, num_ready, num_unready, address_metrics,
            );
        }
    }
fn update_metrics ( & self ) { let num_ready = self . ready_services . len ( ) ; let num_unready = self . unready_services . len ( ) ; let num_peers = num_ready + num_unready ; metrics :: gauge ! ( " " num_ready as f64 ) ; metrics :: gauge ! ( " " num_unready as f64 ) ; metrics :: gauge ! ( " " num_peers as f64 ) ; // Security: make sure we haven't exceeded the connection limit if num_peers > self . peerset_total_connection_limit { let address_metrics = self . address_metrics . borrow ( ) ; panic ! ( " \n \
 \n \
 " num_peers num_ready num_unready address_metrics ) ; } }
Updates the peer set metrics.
Updates the peer set metrics .
&self
panics
If the peer set size exceeds the connection limit.
If the peer set size exceeds the connection limit .