pub struct LiveMetrics { /* private fields */ }Expand description
Prometheus metrics collected during live trading.
Implementations§
Source§impl LiveMetrics
impl LiveMetrics
pub fn new() -> Self
pub fn registry(&self) -> Registry
pub fn inc_tick(&self)
pub fn inc_candle(&self)
pub fn inc_signals(&self, count: usize)
pub fn inc_order(&self)
pub fn inc_order_failure(&self)
pub fn inc_panic_close(&self)
pub fn inc_router_failure(&self, reason: &str)
pub fn update_equity(&self, equity: f64)
pub fn update_price(&self, symbol: &str, price: f64)
pub fn update_staleness(&self, seconds: f64)
pub fn update_position_diff(&self, symbol: &str, diff: f64)
pub fn inc_checksum_mismatch(&self, driver: &str, symbol: &str)
pub fn update_balance_diff(&self, currency: &str, diff: f64)
pub fn update_connection_status(&self, stream: &str, connected: bool)
pub fn update_last_data_timestamp(&self, timestamp_secs: f64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveMetrics
impl !RefUnwindSafe for LiveMetrics
impl Send for LiveMetrics
impl Sync for LiveMetrics
impl Unpin for LiveMetrics
impl !UnwindSafe for LiveMetrics
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request