pub struct PerformanceMetrics {
pub search_count: Arc<AtomicU64>,
pub total_search_time: Arc<AtomicU64>,
pub index_build_count: Arc<AtomicU64>,
pub total_index_time: Arc<AtomicU64>,
pub bytes_processed: Arc<AtomicU64>,
pub lines_searched: Arc<AtomicU64>,
}
Expand description
Global performance metrics collector
Fields§
§search_count: Arc<AtomicU64>
Number of search operations performed
total_search_time: Arc<AtomicU64>
Total time spent in search operations (in microseconds)
index_build_count: Arc<AtomicU64>
Number of index build operations performed
total_index_time: Arc<AtomicU64>
Total time spent in index build operations (in microseconds)
bytes_processed: Arc<AtomicU64>
Total bytes processed during indexing
lines_searched: Arc<AtomicU64>
Total lines searched across all operations
Implementations§
Source§impl PerformanceMetrics
impl PerformanceMetrics
Sourcepub fn record_search(&self, duration: Duration, lines_count: usize)
pub fn record_search(&self, duration: Duration, lines_count: usize)
Record a search operation
Sourcepub fn record_index_build(&self, duration: Duration, bytes_count: usize)
pub fn record_index_build(&self, duration: Duration, bytes_count: usize)
Record an index build operation
Sourcepub fn avg_search_time_micros(&self) -> f64
pub fn avg_search_time_micros(&self) -> f64
Get average search time in microseconds
Sourcepub fn avg_index_time_millis(&self) -> f64
pub fn avg_index_time_millis(&self) -> f64
Get average index build time in milliseconds
Sourcepub fn search_throughput_lines_per_sec(&self) -> f64
pub fn search_throughput_lines_per_sec(&self) -> f64
Get throughput in lines per second for search operations
Sourcepub fn index_throughput_mbps(&self) -> f64
pub fn index_throughput_mbps(&self) -> f64
Get processing throughput in MB/s for indexing operations
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print performance summary
Trait Implementations§
Source§impl Clone for PerformanceMetrics
impl Clone for PerformanceMetrics
Source§fn clone(&self) -> PerformanceMetrics
fn clone(&self) -> PerformanceMetrics
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 PerformanceMetrics
impl Debug for PerformanceMetrics
Auto Trait Implementations§
impl Freeze for PerformanceMetrics
impl RefUnwindSafe for PerformanceMetrics
impl Send for PerformanceMetrics
impl Sync for PerformanceMetrics
impl Unpin for PerformanceMetrics
impl UnwindSafe for PerformanceMetrics
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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