Struct veloren_network::metrics::NetworkMetrics
source · pub struct NetworkMetrics {Show 13 fields
pub listen_requests_total: IntCounterVec,
pub connect_requests_total: IntCounterVec,
pub incoming_connections_total: IntCounterVec,
pub failed_handshakes_total: IntCounter,
pub participants_connected_total: IntCounter,
pub participants_disconnected_total: IntCounter,
pub participants_channel_ids: IntGaugeVec,
pub participants_bandwidth: IntGaugeVec,
pub channels_connected_total: IntCounterVec,
pub channels_disconnected_total: IntCounterVec,
pub streams_opened_total: IntCounterVec,
pub streams_closed_total: IntCounterVec,
pub network_info: IntGauge,
}
Expand description
1:1 relation between NetworkMetrics and Network
Fields§
§listen_requests_total: IntCounterVec
§connect_requests_total: IntCounterVec
§incoming_connections_total: IntCounterVec
§failed_handshakes_total: IntCounter
§participants_connected_total: IntCounter
§participants_disconnected_total: IntCounter
§participants_channel_ids: IntGaugeVec
§participants_bandwidth: IntGaugeVec
§channels_connected_total: IntCounterVec
§channels_disconnected_total: IntCounterVec
§streams_opened_total: IntCounterVec
§streams_closed_total: IntCounterVec
§network_info: IntGauge
Implementations§
source§impl NetworkMetrics
impl NetworkMetrics
pub fn new(local_pid: &Pid) -> Result<Self, Box<dyn Error>>
pub fn register(&self, registry: &Registry) -> Result<(), Box<dyn Error>>
pub(crate) fn connect_requests_cache(&self, protocol: &ListenAddr) -> IntCounter
pub(crate) fn channels_connected(&self, remote_p: &str, no: usize, cid: Cid)
pub(crate) fn channels_disconnected(&self, remote_p: &str)
pub(crate) fn participant_bandwidth(&self, remote_p: &str, bandwidth: f32)
pub(crate) fn streams_opened(&self, remote_p: &str)
pub(crate) fn streams_closed(&self, remote_p: &str)
pub(crate) fn listen_request(&self, protocol: &ListenAddr)
pub(crate) fn connect_request(&self, protocol: &ConnectAddr)
pub(crate) fn cleanup_participant(&self, remote_p: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkMetrics
impl !RefUnwindSafe for NetworkMetrics
impl Send for NetworkMetrics
impl Sync for NetworkMetrics
impl Unpin for NetworkMetrics
impl !UnwindSafe for NetworkMetrics
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more