pub struct QueryProfiler { /* private fields */ }Expand description
SPARQL query profiler
Implementations§
Source§impl QueryProfiler
impl QueryProfiler
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if profiling is enabled
Sourcepub fn start_query(&mut self, query_id: String)
pub fn start_query(&mut self, query_id: String)
Start profiling a query
Sourcepub fn start_phase(&mut self, phase: QueryPhase)
pub fn start_phase(&mut self, phase: QueryPhase)
Start a query phase
Sourcepub fn end_phase(&mut self, phase: QueryPhase)
pub fn end_phase(&mut self, phase: QueryPhase)
End a query phase
Sourcepub fn record_triples(&mut self, count: usize)
pub fn record_triples(&mut self, count: usize)
Record triples matched
Sourcepub fn record_results(&mut self, count: usize)
pub fn record_results(&mut self, count: usize)
Record results count
Sourcepub fn record_memory(&mut self, bytes: usize)
pub fn record_memory(&mut self, bytes: usize)
Record memory usage
Sourcepub fn record_join(&mut self)
pub fn record_join(&mut self)
Record join operation
Sourcepub fn record_cache_hit_rate(&mut self, rate: f64)
pub fn record_cache_hit_rate(&mut self, rate: f64)
Record cache hit rate
Sourcepub fn end_query(&mut self) -> Option<QueryStats>
pub fn end_query(&mut self) -> Option<QueryStats>
End profiling current query
Sourcepub fn current_stats(&self) -> Option<&QueryStats>
pub fn current_stats(&self) -> Option<&QueryStats>
Get current query statistics
Sourcepub fn history(&self) -> &[QueryStats]
pub fn history(&self) -> &[QueryStats]
Get query history
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear history
Sourcepub fn average_stats(&self) -> Option<AverageStats>
pub fn average_stats(&self) -> Option<AverageStats>
Get average statistics across all queries in history
Sourcepub fn summary_report(&self) -> String
pub fn summary_report(&self) -> String
Generate summary report
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryProfiler
impl RefUnwindSafe for QueryProfiler
impl Send for QueryProfiler
impl Sync for QueryProfiler
impl Unpin for QueryProfiler
impl UnsafeUnpin for QueryProfiler
impl UnwindSafe for QueryProfiler
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.