pub struct MetricsSnapshot {
Show 26 fields pub data: MetricsData, pub unixtime: f64, pub duration: f64, pub resident_set_size_bytes: f64, pub virtual_memory_size_bytes: f64, pub cpu_cores: f64, pub cpu_usage: f64, pub fd_num: f64, pub disk_io_read_bytes: f64, pub disk_io_write_bytes: f64, pub disk_io_read_per_sec: f64, pub disk_io_write_per_sec: f64, pub blocks_submitted: f64, pub header_counts: f64, pub dep_counts: f64, pub body_counts: f64, pub txs_counts: f64, pub tps: f64, pub chain_block_counts: f64, pub mass_counts: f64, pub block_count: f64, pub tip_hashes: f64, pub difficulty: f64, pub past_median_time: f64, pub virtual_parent_hashes: f64, pub virtual_daa_score: f64,
}

Fields§

§data: MetricsData§unixtime: f64§duration: f64§resident_set_size_bytes: f64§virtual_memory_size_bytes: f64§cpu_cores: f64§cpu_usage: f64§fd_num: f64§disk_io_read_bytes: f64§disk_io_write_bytes: f64§disk_io_read_per_sec: f64§disk_io_write_per_sec: f64§blocks_submitted: f64§header_counts: f64§dep_counts: f64§body_counts: f64§txs_counts: f64§tps: f64§chain_block_counts: f64§mass_counts: f64§block_count: f64§tip_hashes: f64§difficulty: f64§past_median_time: f64§virtual_parent_hashes: f64§virtual_daa_score: f64

Implementations§

source§

impl MetricsSnapshot

source

pub fn get(&self, metric: &Metric) -> f64

source

pub fn format(&self, metric: &Metric, si: bool) -> String

Trait Implementations§

source§

impl BorshDeserialize for MetricsSnapshotwhere MetricsData: BorshDeserialize, f64: BorshDeserialize,

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

impl BorshSerialize for MetricsSnapshotwhere MetricsData: BorshSerialize, f64: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for MetricsSnapshot

source§

fn clone(&self) -> MetricsSnapshot

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
source§

impl Debug for MetricsSnapshot

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MetricsSnapshot

source§

fn default() -> MetricsSnapshot

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for MetricsSnapshot

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<(&MetricsData, &MetricsData)> for MetricsSnapshot

source§

fn from((a, b): (&MetricsData, &MetricsData)) -> Self

Converts to this type from the input type.
source§

impl Serialize for MetricsSnapshot

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Any for Twhere T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

source§

fn type_name(&self) -> &'static str

source§

impl<T> AnySync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

§

impl<T> AsAny for Twhere T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<S> CastArc for Swhere S: CastFromSync + ?Sized,

§

fn cast<T>(self: Arc<S>) -> Result<Arc<T>, Arc<S>>where T: 'static + ?Sized,

Casts an Arc for this trait into that for type T.
§

impl<S> CastBox for Swhere S: CastFrom + ?Sized,

§

fn cast<T>(self: Box<S>) -> Result<Box<T>, Box<S>>where T: 'static + ?Sized,

Casts a box to this trait into that of type T. If fails, returns the receiver.
§

impl<T> CastFrom for Twhere T: Any + 'static,

§

fn ref_any(&self) -> &(dyn Any + 'static)

Returns a immutable reference to Any, which is backed by the type implementing this trait.
§

fn mut_any(&mut self) -> &mut (dyn Any + 'static)

Returns a mutable reference to Any, which is backed by the type implementing this trait.
§

fn box_any(self: Box<T>) -> Box<dyn Any>

Returns a Box of Any, which is backed by the type implementing this trait.
§

fn rc_any(self: Rc<T>) -> Rc<dyn Any>

Returns an Rc of Any, which is backed by the type implementing this trait.
§

impl<T> CastFromSync for Twhere T: Sync + Send + 'static,

§

fn arc_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

§

impl<S> CastMut for Swhere S: CastFrom + ?Sized,

§

fn cast<T>(&mut self) -> Option<&mut T>where T: 'static + ?Sized,

Casts a mutable reference to this trait into that of type T.
§

impl<S> CastRc for Swhere S: CastFrom + ?Sized,

§

fn cast<T>(self: Rc<S>) -> Result<Rc<T>, Rc<S>>where T: 'static + ?Sized,

Casts an Rc for this trait into that for type T.
§

impl<S> CastRef for Swhere S: CastFrom + ?Sized,

§

fn cast<T>(&self) -> Option<&T>where T: 'static + ?Sized,

Casts a reference to this trait into that of type T.
§

fn impls<T>(&self) -> boolwhere T: 'static + ?Sized,

Tests if this trait object can be cast into T.
§

impl<T> CloneAny for Twhere T: Any + Clone + Send + Sync,

§

fn clone_any(&self) -> Box<dyn CloneAny>

§

fn clone_any_send(&self) -> Box<dyn CloneAny + Send>

§

fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync>

§

fn clone_any_send_sync(&self) -> Box<dyn CloneAny + Send + Sync>

§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T, U> ExactFrom<T> for Uwhere U: TryFrom<T>,

§

fn exact_from(value: T) -> U

§

impl<T, U> ExactInto<U> for Twhere U: ExactFrom<T>,

§

fn exact_into(self) -> U

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 Twhere 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.

§

impl<T, U> OverflowingInto<U> for Twhere U: OverflowingFrom<T>,

§

fn overflowing_into(self) -> (U, bool)

§

impl<T, U> RoundingInto<U> for Twhere U: RoundingFrom<T>,

§

fn rounding_into(self, rm: RoundingMode) -> (U, Ordering)

source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T, U> SaturatingInto<U> for Twhere U: SaturatingFrom<T>,

§

fn saturating_into(self) -> U

§

impl<T> ToDebugString for Twhere T: Debug,

§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T, U> WrappingInto<U> for Twhere U: WrappingFrom<T>,

§

fn wrapping_into(self) -> U

§

impl<T> DebugAny for Twhere T: Any + Debug,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<T> MsgT for Twhere T: Debug + BorshSerialize + BorshDeserialize + Serialize + DeserializeOwned + Send + Sync + 'static,

§

impl<T> MsgT for Twhere T: Debug + BorshSerialize + BorshDeserialize + Serialize + DeserializeOwned + Send + Sync + 'static,

§

impl<T> UnsafeAny for Twhere T: Any,