pub struct PerformanceProfiler { /* private fields */ }Expand description
Advanced performance profiler with real-time analytics
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn new(config: ProfilerConfig) -> Self
pub fn new(config: ProfilerConfig) -> Self
Create a new performance profiler with real-time analytics
Sourcepub fn set_debug_logger(&mut self, logger: DebugLogger)
pub fn set_debug_logger(&mut self, logger: DebugLogger)
Set debug logger for integration
Sourcepub fn start_operation(&mut self, name: &str, operation_type: OperationType)
pub fn start_operation(&mut self, name: &str, operation_type: OperationType)
Start profiling an operation
Sourcepub fn end_operation(&mut self, name: &str) -> Option<f64>
pub fn end_operation(&mut self, name: &str) -> Option<f64>
End profiling an operation
Sourcepub fn sample_resources(&mut self)
pub fn sample_resources(&mut self)
Sample current resource usage with enhanced thermal and power monitoring
Sourcepub fn analyze_performance(&self) -> String
pub fn analyze_performance(&self) -> String
Analyze performance and detect bottlenecks
Sourcepub fn get_performance_summary(&self) -> String
pub fn get_performance_summary(&self) -> String
Get performance summary as JSON string
Sourcepub fn get_operation_breakdown(&self) -> Array
pub fn get_operation_breakdown(&self) -> Array
Get operation breakdown for visualization
Sourcepub fn get_resource_timeline(&self) -> Array
pub fn get_resource_timeline(&self) -> Array
Get resource usage timeline for visualization
Sourcepub fn set_baseline(&mut self)
pub fn set_baseline(&mut self)
Set baseline metrics for comparison
Sourcepub fn compare_with_baseline(&self) -> Option<String>
pub fn compare_with_baseline(&self) -> Option<String>
Compare current performance with baseline
Sourcepub fn export_data(&self) -> String
pub fn export_data(&self) -> String
Export profiling data for external analysis
Sourcepub fn update_real_time_metrics(
&mut self,
latency_ms: f64,
throughput: f32,
memory_mb: f32,
accuracy: f32,
)
pub fn update_real_time_metrics( &mut self, latency_ms: f64, throughput: f32, memory_mb: f32, accuracy: f32, )
Update real-time performance metrics and trigger adaptation if needed
Sourcepub fn set_optimization_target(&mut self, target_name: &str)
pub fn set_optimization_target(&mut self, target_name: &str)
Set optimization target for adaptive optimization
Sourcepub fn get_performance_trends(&self) -> Object
pub fn get_performance_trends(&self) -> Object
Get current performance trends as JavaScript object
Sourcepub fn get_detected_anomalies(&self) -> Array
pub fn get_detected_anomalies(&self) -> Array
Get detected anomalies as JavaScript array
Sourcepub fn get_adaptive_state(&self) -> Object
pub fn get_adaptive_state(&self) -> Object
Get adaptive optimization state
Sourcepub fn set_real_time_analytics(&mut self, enabled: bool)
pub fn set_real_time_analytics(&mut self, enabled: bool)
Enable/disable real-time analytics
Sourcepub fn set_adaptive_optimization(&mut self, enabled: bool)
pub fn set_adaptive_optimization(&mut self, enabled: bool)
Enable/disable adaptive optimization
Sourcepub fn create_baseline(&mut self, name: &str)
pub fn create_baseline(&mut self, name: &str)
Create a performance baseline for comparison
Sourcepub fn get_thermal_recommendations(&self) -> Vec<String>
pub fn get_thermal_recommendations(&self) -> Vec<String>
Get thermal-aware performance recommendations
Trait Implementations§
Source§impl From<PerformanceProfiler> for JsValue
impl From<PerformanceProfiler> for JsValue
Source§fn from(value: PerformanceProfiler) -> Self
fn from(value: PerformanceProfiler) -> Self
Source§impl FromWasmAbi for PerformanceProfiler
impl FromWasmAbi for PerformanceProfiler
Source§impl IntoWasmAbi for PerformanceProfiler
impl IntoWasmAbi for PerformanceProfiler
Source§impl RefFromWasmAbi for PerformanceProfiler
impl RefFromWasmAbi for PerformanceProfiler
Source§type Anchor = RcRef<PerformanceProfiler>
type Anchor = RcRef<PerformanceProfiler>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for PerformanceProfiler
impl TryFromJsValue for PerformanceProfiler
Source§impl VectorFromWasmAbi for PerformanceProfiler
impl VectorFromWasmAbi for PerformanceProfiler
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[PerformanceProfiler]>
Source§impl VectorIntoWasmAbi for PerformanceProfiler
impl VectorIntoWasmAbi for PerformanceProfiler
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[PerformanceProfiler]>) -> Self::Abi
Source§impl WasmDescribeVector for PerformanceProfiler
impl WasmDescribeVector for PerformanceProfiler
impl SupportsConstructor for PerformanceProfiler
impl SupportsInstanceProperty for PerformanceProfiler
impl SupportsStaticProperty for PerformanceProfiler
Auto Trait Implementations§
impl Freeze for PerformanceProfiler
impl RefUnwindSafe for PerformanceProfiler
impl Send for PerformanceProfiler
impl Sync for PerformanceProfiler
impl Unpin for PerformanceProfiler
impl UnsafeUnpin for PerformanceProfiler
impl UnwindSafe for PerformanceProfiler
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.