pub struct PerformanceTracker { /* private fields */ }Expand description
Real-time performance tracker for long-horizon operations
Implementations§
Source§impl PerformanceTracker
impl PerformanceTracker
pub fn new() -> Self
Sourcepub async fn record_tool_call(
&self,
tool_call_id: u32,
duration_ms: u64,
cost: f64,
) -> Result<(), Error>
pub async fn record_tool_call( &self, tool_call_id: u32, duration_ms: u64, cost: f64, ) -> Result<(), Error>
Record a tool call with performance metrics
Sourcepub async fn record_operation(
&self,
operation_name: &str,
tool_calls_used: u32,
duration_ms: u64,
success: bool,
metadata: Value,
) -> Result<(), Error>
pub async fn record_operation( &self, operation_name: &str, tool_calls_used: u32, duration_ms: u64, success: bool, metadata: Value, ) -> Result<(), Error>
Record execution of a complex operation
Sourcepub async fn get_real_time_metrics(&self) -> Result<RealTimeMetrics, Error>
pub async fn get_real_time_metrics(&self) -> Result<RealTimeMetrics, Error>
Get current real-time metrics
Sourcepub async fn get_performance_summary(
&self,
window_duration: Duration,
) -> Result<PerformanceSummary, Error>
pub async fn get_performance_summary( &self, window_duration: Duration, ) -> Result<PerformanceSummary, Error>
Get performance summary for a time window
Sourcepub async fn get_resource_utilization(
&self,
) -> Result<ResourceUtilization, Error>
pub async fn get_resource_utilization( &self, ) -> Result<ResourceUtilization, Error>
Get resource utilization statistics
Sourcepub async fn get_optimization_recommendations(
&self,
) -> Result<Vec<OptimizationRecommendation>, Error>
pub async fn get_optimization_recommendations( &self, ) -> Result<Vec<OptimizationRecommendation>, Error>
Get optimization recommendations
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerformanceTracker
impl !RefUnwindSafe for PerformanceTracker
impl Send for PerformanceTracker
impl Sync for PerformanceTracker
impl Unpin for PerformanceTracker
impl !UnwindSafe for PerformanceTracker
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 more