pub struct PerformanceTracker { /* private fields */ }Expand description
Performance tracker
Implementations§
Source§impl PerformanceTracker
impl PerformanceTracker
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a tracker with fresh metrics store, benchmark comparator, and attribution analyzer.
Sourcepub fn initialize(&mut self) -> Result<(), FinancialError>
pub fn initialize(&mut self) -> Result<(), FinancialError>
Initializes sub-components; currently a pass-through returning Ok(()) on the in-memory store.
Sourcepub fn get_metrics(&self) -> FinancialPerformanceMetrics
pub fn get_metrics(&self) -> FinancialPerformanceMetrics
Returns a fresh zeroed FinancialPerformanceMetrics — scaffold-level, not measured values.
Sourcepub fn record_performance_metrics(&mut self, metrics: PerformanceMetrics)
pub fn record_performance_metrics(&mut self, metrics: PerformanceMetrics)
Stores metrics keyed by its portfolio_id (overwrites silently).
Sourcepub fn get_performance_metrics(
&self,
portfolio_id: &str,
) -> Option<&PerformanceMetrics>
pub fn get_performance_metrics( &self, portfolio_id: &str, ) -> Option<&PerformanceMetrics>
Recorded metrics for portfolio_id, or None.
Sourcepub fn list_performance_metrics(&self) -> Vec<String>
pub fn list_performance_metrics(&self) -> Vec<String>
Portfolio IDs with recorded metrics.
Sourcepub fn benchmark_comparator(&self) -> &BenchmarkComparator
pub fn benchmark_comparator(&self) -> &BenchmarkComparator
Shared access to the benchmark comparator store.
Sourcepub fn benchmark_comparator_mut(&mut self) -> &mut BenchmarkComparator
pub fn benchmark_comparator_mut(&mut self) -> &mut BenchmarkComparator
Mutable access to the benchmark comparator store.
Sourcepub fn attribution_analyzer(&self) -> &AttributionAnalyzer
pub fn attribution_analyzer(&self) -> &AttributionAnalyzer
Shared access to the attribution analyzer store.
Sourcepub fn attribution_analyzer_mut(&mut self) -> &mut AttributionAnalyzer
pub fn attribution_analyzer_mut(&mut self) -> &mut AttributionAnalyzer
Mutable access to the attribution analyzer store.
Auto Trait Implementations§
impl Freeze for PerformanceTracker
impl RefUnwindSafe for PerformanceTracker
impl Send for PerformanceTracker
impl Sync for PerformanceTracker
impl Unpin for PerformanceTracker
impl UnsafeUnpin for PerformanceTracker
impl UnwindSafe for PerformanceTracker
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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