pub struct HistogramEngine { /* private fields */ }Expand description
Engine for computing histograms from journal files.
The engine maintains caches and resources for efficiently computing histograms across multiple queries. It can be reused for multiple histogram computations.
Implementations§
Source§impl HistogramEngine
impl HistogramEngine
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new HistogramEngine with a default capacity of 1000 bucket responses.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new HistogramEngine with the specified cache capacity.
The capacity determines how many bucket responses will be cached before old entries are evicted using an LRU policy.
Sourcepub fn compute_from_indexes(
&self,
indexed_files: &[(FileIndexKey, FileIndex)],
time_range: &QueryTimeRange,
facets: &[String],
filter_expr: &Filter,
) -> Result<Histogram>
pub fn compute_from_indexes( &self, indexed_files: &[(FileIndexKey, FileIndex)], time_range: &QueryTimeRange, facets: &[String], filter_expr: &Filter, ) -> Result<Histogram>
Compute a histogram from pre-indexed files.
This method allows you to compute histograms from file indexes that have already been loaded, avoiding redundant cache lookups and file discoveries.
§Arguments
indexed_files- Pre-computed file indexestime_range- Query time range with aligned boundaries and bucket durationfacets- Fields to indexfilter_expr- Filter expression to apply
Auto Trait Implementations§
impl !Freeze for HistogramEngine
impl !RefUnwindSafe for HistogramEngine
impl Send for HistogramEngine
impl Sync for HistogramEngine
impl Unpin for HistogramEngine
impl UnsafeUnpin for HistogramEngine
impl UnwindSafe for HistogramEngine
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