pub struct PerformanceDashboard { /* private fields */ }Implementations§
Source§impl PerformanceDashboard
impl PerformanceDashboard
pub fn new(config: DashboardConfig, pool: PgPool) -> Result<Self>
Sourcepub fn record_latency(&self, duration_seconds: f64)
pub fn record_latency(&self, duration_seconds: f64)
Record operation latency
Sourcepub fn record_throughput(&self, ops_per_second: f64)
pub fn record_throughput(&self, ops_per_second: f64)
Update throughput metric
Sourcepub fn record_memory_headroom(&self, headroom_percent: f64)
pub fn record_memory_headroom(&self, headroom_percent: f64)
Update memory headroom
Sourcepub fn record_token_reduction(&self, reduction_percent: f64)
pub fn record_token_reduction(&self, reduction_percent: f64)
Update token reduction metrics
Sourcepub async fn get_performance_summary(&self) -> Result<PerformanceSummary>
pub async fn get_performance_summary(&self) -> Result<PerformanceSummary>
Get current performance summary
Sourcepub fn export_prometheus_metrics(&self) -> String
pub fn export_prometheus_metrics(&self) -> String
Export Prometheus metrics
Trait Implementations§
Source§impl Clone for PerformanceDashboard
impl Clone for PerformanceDashboard
Auto Trait Implementations§
impl Freeze for PerformanceDashboard
impl !RefUnwindSafe for PerformanceDashboard
impl Send for PerformanceDashboard
impl Sync for PerformanceDashboard
impl Unpin for PerformanceDashboard
impl !UnwindSafe for PerformanceDashboard
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more