pub struct PerformanceProfiler { /* private fields */ }
Expand description
Performance profiler for tracking parsing metrics
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn with_config(config: ProfilingConfig) -> Self
pub fn with_config(config: ProfilingConfig) -> Self
Create a profiler with custom configuration
Sourcepub fn start_session(&mut self)
pub fn start_session(&mut self)
Start a new profiling session
Sourcepub fn record_metric(
&mut self,
metric_type: MetricType,
value: f64,
unit: &str,
context: Option<String>,
)
pub fn record_metric( &mut self, metric_type: MetricType, value: f64, unit: &str, context: Option<String>, )
Record a performance metric
Sourcepub fn time_parse_operation<F, R>(&mut self, operation: F) -> Result<R>
pub fn time_parse_operation<F, R>(&mut self, operation: F) -> Result<R>
Time a parsing operation
Sourcepub fn profile_memory_usage(&mut self)
pub fn profile_memory_usage(&mut self)
Profile memory usage (simplified - would need real memory tracking in production)
Sourcepub fn record_node_creation(&mut self, count: u64)
pub fn record_node_creation(&mut self, count: u64)
Record node creation metrics
Sourcepub fn record_edge_creation(&mut self, count: u64)
pub fn record_edge_creation(&mut self, count: u64)
Record edge creation metrics
Sourcepub fn record_file_size(&mut self, size_bytes: u64)
pub fn record_file_size(&mut self, size_bytes: u64)
Record file size being parsed
Sourcepub fn generate_report(&self) -> ProfilingReport
pub fn generate_report(&self) -> ProfilingReport
Generate a comprehensive profiling report
Sourcepub fn export_csv(&self) -> String
pub fn export_csv(&self) -> String
Export metrics to CSV format
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 moreSource§impl Debug for PerformanceProfiler
impl Debug 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 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> 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