pub struct PerformanceProfiler { /* private fields */ }Expand description
Main performance profiler for pipeline execution
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn new(config: ProfilerConfig) -> Self
pub fn new(config: ProfilerConfig) -> Self
Create a new performance profiler
Sourcepub fn start_session(&self, pipeline_name: &str) -> String
pub fn start_session(&self, pipeline_name: &str) -> String
Start a new profiling session
Sourcepub fn start_stage(
&self,
session_id: &str,
stage_name: &str,
component_type: &str,
) -> Result<(), String>
pub fn start_stage( &self, session_id: &str, stage_name: &str, component_type: &str, ) -> Result<(), String>
Start profiling a specific pipeline stage
Sourcepub fn end_stage(
&self,
session_id: &str,
stage_name: &str,
) -> Result<Duration, String>
pub fn end_stage( &self, session_id: &str, stage_name: &str, ) -> Result<Duration, String>
End profiling a specific pipeline stage
Sourcepub fn record_stage_parameters(
&self,
session_id: &str,
stage_name: &str,
parameters: HashMap<String, String>,
) -> Result<(), String>
pub fn record_stage_parameters( &self, session_id: &str, stage_name: &str, parameters: HashMap<String, String>, ) -> Result<(), String>
Record stage parameters for analysis
Sourcepub fn record_data_shapes(
&self,
session_id: &str,
stage_name: &str,
input_shape: Option<(usize, usize)>,
output_shape: Option<(usize, usize)>,
) -> Result<(), String>
pub fn record_data_shapes( &self, session_id: &str, stage_name: &str, input_shape: Option<(usize, usize)>, output_shape: Option<(usize, usize)>, ) -> Result<(), String>
Record data shapes for performance analysis
Sourcepub fn end_session(&self, session_id: &str) -> Result<ProfileSession, String>
pub fn end_session(&self, session_id: &str) -> Result<ProfileSession, String>
End profiling session and generate analysis
Sourcepub fn get_completed_sessions(&self) -> Vec<ProfileSession>
pub fn get_completed_sessions(&self) -> Vec<ProfileSession>
Get all completed sessions
Sourcepub fn generate_report(&self, session_id: Option<&str>) -> PerformanceReport
pub fn generate_report(&self, session_id: Option<&str>) -> PerformanceReport
Generate comprehensive performance report
Trait Implementations§
Source§impl Clone for PerformanceProfiler
impl Clone for PerformanceProfiler
Source§fn clone(&self) -> PerformanceProfiler
fn clone(&self) -> PerformanceProfiler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PerformanceProfiler
impl RefUnwindSafe for PerformanceProfiler
impl Send for PerformanceProfiler
impl Sync for PerformanceProfiler
impl Unpin 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
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> 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