Struct massa_metrics::MassaMetrics

source ·
pub struct MassaMetrics {
Show 46 fields pub(crate) enabled: bool, pub(crate) process_available_processors: IntGauge, pub(crate) consensus_vec: Vec<Gauge>, pub(crate) stakers: IntGauge, pub(crate) rolls: IntGauge, pub(crate) current_time_thread: IntGauge, pub(crate) current_time_period: IntGauge, pub(crate) active_history: IntGauge, pub(crate) operations_pool: IntGauge, pub(crate) endorsements_pool: IntGauge, pub(crate) denunciations_pool: IntGauge, pub(crate) async_message_pool_size: IntGauge, pub(crate) sc_messages_final: IntCounter, pub(crate) bootstrap_counter: IntCounter, pub(crate) bootstrap_peers_success: IntCounter, pub(crate) bootstrap_peers_failed: IntCounter, pub(crate) protocol_tester_success: IntCounter, pub(crate) protocol_tester_failed: IntCounter, pub(crate) protocol_known_peers: IntGauge, pub(crate) protocol_banned_peers: IntGauge, pub(crate) executed_final_slot: IntCounter, pub(crate) executed_final_slot_with_block: IntCounter, pub(crate) peernet_total_bytes_received: IntCounter, pub(crate) peernet_total_bytes_sent: IntCounter, pub(crate) block_slot_delay: Histogram, pub(crate) active_in_connections: IntGauge, pub(crate) active_out_connections: IntGauge, pub(crate) operations_final_counter: IntCounter, pub(crate) block_cache_checked_headers_size: IntGauge, pub(crate) block_cache_blocks_known_by_peer: IntGauge, pub(crate) operation_cache_checked_operations: IntGauge, pub(crate) operation_cache_checked_operations_prefix: IntGauge, pub(crate) operation_cache_ops_know_by_peer: IntGauge, pub(crate) consensus_state_active_index: IntGauge, pub(crate) consensus_state_active_index_without_ops: IntGauge, pub(crate) consensus_state_incoming_index: IntGauge, pub(crate) consensus_state_discarded_index: IntGauge, pub(crate) consensus_state_block_statuses: IntGauge, pub(crate) endorsement_cache_checked_endorsements: IntGauge, pub(crate) endorsement_cache_known_by_peer: IntGauge, pub(crate) active_cursor_thread: IntGauge, pub(crate) active_cursor_period: IntGauge, pub(crate) final_cursor_thread: IntGauge, pub(crate) final_cursor_period: IntGauge, pub(crate) peers_bandwidth: Arc<RwLock<HashMap<String, (IntCounter, IntCounter)>>>, pub tick_delay: Duration,
}

Fields§

§enabled: bool

enable metrics

§process_available_processors: IntGauge

number of processors

§consensus_vec: Vec<Gauge>

consensus period for each thread index 0 = thread 0 …

§stakers: IntGauge

number of stakers

§rolls: IntGauge

number of rolls

§current_time_thread: IntGauge§current_time_period: IntGauge§active_history: IntGauge

number of elements in the active_history of execution

§operations_pool: IntGauge

number of operations in the operation pool

§endorsements_pool: IntGauge

number of endorsements in the endorsement pool

§denunciations_pool: IntGauge

number of elements in the denunciation pool

§async_message_pool_size: IntGauge§sc_messages_final: IntCounter§bootstrap_counter: IntCounter

number of times our node (re-)bootstrapped

§bootstrap_peers_success: IntCounter

number of times we successfully bootstrapped someone

§bootstrap_peers_failed: IntCounter

number of times we failed/refused to bootstrap someone

§protocol_tester_success: IntCounter

number of times we successfully tested someone

§protocol_tester_failed: IntCounter

number of times we failed to test someone

§protocol_known_peers: IntGauge

know peers in protocol

§protocol_banned_peers: IntGauge

banned peers in protocol

§executed_final_slot: IntCounter

executed final slot

§executed_final_slot_with_block: IntCounter

executed final slot with block (not miss)

§peernet_total_bytes_received: IntCounter

total bytes receive by peernet manager

§peernet_total_bytes_sent: IntCounter

total bytes sent by peernet manager

§block_slot_delay: Histogram

block slot delay

§active_in_connections: IntGauge

active in connections peer

§active_out_connections: IntGauge

active out connections peer

§operations_final_counter: IntCounter

counter of operations for final slot

§block_cache_checked_headers_size: IntGauge§block_cache_blocks_known_by_peer: IntGauge§operation_cache_checked_operations: IntGauge§operation_cache_checked_operations_prefix: IntGauge§operation_cache_ops_know_by_peer: IntGauge§consensus_state_active_index: IntGauge§consensus_state_active_index_without_ops: IntGauge§consensus_state_incoming_index: IntGauge§consensus_state_discarded_index: IntGauge§consensus_state_block_statuses: IntGauge§endorsement_cache_checked_endorsements: IntGauge§endorsement_cache_known_by_peer: IntGauge§active_cursor_thread: IntGauge§active_cursor_period: IntGauge§final_cursor_thread: IntGauge§final_cursor_period: IntGauge§peers_bandwidth: Arc<RwLock<HashMap<String, (IntCounter, IntCounter)>>>§tick_delay: Duration

Implementations§

source§

impl MassaMetrics

source

pub fn new( enabled: bool, addr: SocketAddr, nb_thread: u8, tick_delay: Duration, ) -> (Self, MetricsStopper)

source

pub fn is_enabled(&self) -> bool

source

pub fn get_metrics_for_survey_thread(&self) -> (i64, i64, u64, u64)

source

pub fn set_active_connections( &self, in_connections: usize, out_connections: usize, )

source

pub fn set_active_cursor(&self, period: u64, thread: u8)

source

pub fn set_final_cursor(&self, period: u64, thread: u8)

source

pub fn set_consensus_period(&self, thread: usize, period: u64)

source

pub fn set_consensus_state( &self, active_index: usize, incoming_index: usize, discarded_index: usize, block_statuses: usize, active_index_without_ops: usize, )

source

pub fn set_block_cache_metrics( &self, checked_header_size: usize, blocks_known_by_peer: usize, )

source

pub fn set_operations_cache_metrics( &self, checked_operations: usize, checked_operations_prefix: usize, ops_know_by_peer: usize, )

source

pub fn set_endorsements_cache_metrics( &self, checked_endorsements: usize, known_by_peer: usize, )

source

pub fn set_peernet_total_bytes_received(&self, new_value: u64)

source

pub fn set_peernet_total_bytes_sent(&self, new_value: u64)

source

pub fn inc_operations_final_counter(&self, diff: u64)

source

pub fn set_known_peers(&self, nb: usize)

source

pub fn set_banned_peers(&self, nb: usize)

source

pub fn inc_executed_final_slot(&self)

source

pub fn inc_executed_final_slot_with_block(&self)

source

pub fn set_active_history(&self, nb: usize)

source

pub fn inc_bootstrap_counter(&self)

source

pub fn inc_bootstrap_peers_success(&self)

source

pub fn inc_bootstrap_peers_failed(&self)

source

pub fn set_operations_pool(&self, nb: usize)

source

pub fn set_endorsements_pool(&self, nb: usize)

source

pub fn set_denunciations_pool(&self, nb: usize)

source

pub fn inc_protocol_tester_success(&self)

source

pub fn inc_protocol_tester_failed(&self)

source

pub fn set_stakers(&self, nb: usize)

source

pub fn set_rolls(&self, nb: usize)

source

pub fn inc_sc_messages_final_by(&self, diff: usize)

source

pub fn set_async_message_pool_size(&self, nb: usize)

source

pub fn set_available_processors(&self, nb: usize)

source

pub fn set_current_time_period(&self, period: u64)

source

pub fn set_current_time_thread(&self, thread: u8)

source

pub fn set_block_slot_delay(&self, delay: f64)

source

pub fn update_peers_tx_rx(&self, data: HashMap<String, (u64, u64)>)

Update the bandwidth metrics for all peers HashMap<peer_id, (tx, rx)>

Trait Implementations§

source§

impl Clone for MassaMetrics

source§

fn clone(&self) -> MassaMetrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more