pub struct QueryEngine { /* private fields */ }Expand description
Query Engine - Unified query interface for memory data
The QueryEngine provides a unified interface for querying memory snapshot data, supporting various query types and filtering options.
Key properties:
- Unified: Single interface for all query types
- Efficient: Optimized for fast query execution
- Flexible: Supports filtering and sorting
Implementations§
Source§impl QueryEngine
impl QueryEngine
Sourcepub fn new(snapshot_engine: SharedSnapshotEngine) -> Self
pub fn new(snapshot_engine: SharedSnapshotEngine) -> Self
Create a new QueryEngine
Sourcepub fn top_allocations(&self, limit: usize) -> QueryResult
pub fn top_allocations(&self, limit: usize) -> QueryResult
Sourcepub fn allocations_by_thread(&self, thread_id: u64) -> QueryResult
pub fn allocations_by_thread(&self, thread_id: u64) -> QueryResult
Sourcepub fn thread_stats(&self) -> QueryResult
pub fn thread_stats(&self) -> QueryResult
Query for thread statistics
Sourcepub fn summary(&self) -> QueryResult
pub fn summary(&self) -> QueryResult
Query for a summary of memory usage
Sourcepub fn allocations_by_variable(&self, var_name: &str) -> QueryResult
pub fn allocations_by_variable(&self, var_name: &str) -> QueryResult
Query for allocations with a specific variable name
§Arguments
var_name- The variable name to filter by
Sourcepub fn allocations_larger_than(&self, min_size: usize) -> QueryResult
pub fn allocations_larger_than(&self, min_size: usize) -> QueryResult
Query for allocations larger than a certain size
§Arguments
min_size- Minimum allocation size in bytes
Auto Trait Implementations§
impl Freeze for QueryEngine
impl !RefUnwindSafe for QueryEngine
impl Send for QueryEngine
impl Sync for QueryEngine
impl Unpin for QueryEngine
impl UnsafeUnpin for QueryEngine
impl !UnwindSafe for QueryEngine
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 more