coerce 0.8.6

Async actor runtime and distributed systems framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub const METRIC_NETWORK_BYTES_RECV: &str = "coerce_network_bytes_recv";
pub const METRIC_NETWORK_BYTES_SENT: &str = "coerce_network_bytes_sent";

pub struct NetworkMetrics;

impl NetworkMetrics {
    #[inline]
    pub fn incr_bytes_received(len: u64) {
        #[cfg(feature = "metrics")]
        counter!(METRIC_NETWORK_BYTES_RECV, len);
    }

    #[inline]
    pub fn incr_bytes_sent(len: u64) {
        #[cfg(feature = "metrics")]
        counter!(METRIC_NETWORK_BYTES_SENT, len);
    }
}