pub struct IndexMetrics {
pub parse_time_ms: u64,
pub build_time_ms: u64,
pub enhance_time_ms: u64,
pub enrich_time_ms: u64,
pub optimize_time_ms: u64,
pub persist_time_ms: u64,
pub total_tokens_generated: usize,
pub llm_calls: usize,
pub nodes_processed: usize,
pub summaries_generated: usize,
pub nodes_skipped: usize,
pub nodes_merged: usize,
}Expand description
Performance metrics for the indexing pipeline.
Fields§
§parse_time_ms: u64Parse stage duration (ms).
build_time_ms: u64Build stage duration (ms).
enhance_time_ms: u64Enhance stage duration (ms).
enrich_time_ms: u64Enrich stage duration (ms).
optimize_time_ms: u64Optimize stage duration (ms).
persist_time_ms: u64Persist stage duration (ms).
total_tokens_generated: usizeTotal tokens generated (summaries).
llm_calls: usizeNumber of LLM calls.
nodes_processed: usizeNumber of nodes processed.
summaries_generated: usizeNumber of summaries generated.
nodes_skipped: usizeNumber of nodes skipped (thinning).
nodes_merged: usizeNumber of nodes merged.
Implementations§
Source§impl IndexMetrics
impl IndexMetrics
Sourcepub fn record_parse(&mut self, duration_ms: u64)
pub fn record_parse(&mut self, duration_ms: u64)
Record parse stage time.
Sourcepub fn record_build(&mut self, duration_ms: u64)
pub fn record_build(&mut self, duration_ms: u64)
Record build stage time.
Sourcepub fn record_enhance(&mut self, duration_ms: u64)
pub fn record_enhance(&mut self, duration_ms: u64)
Record enhance stage time.
Sourcepub fn record_enrich(&mut self, duration_ms: u64)
pub fn record_enrich(&mut self, duration_ms: u64)
Record enrich stage time.
Sourcepub fn record_optimize(&mut self, duration_ms: u64)
pub fn record_optimize(&mut self, duration_ms: u64)
Record optimize stage time.
Sourcepub fn record_persist(&mut self, duration_ms: u64)
pub fn record_persist(&mut self, duration_ms: u64)
Record persist stage time.
Sourcepub fn increment_llm_calls(&mut self)
pub fn increment_llm_calls(&mut self)
Increment LLM calls.
Sourcepub fn add_tokens_generated(&mut self, tokens: usize)
pub fn add_tokens_generated(&mut self, tokens: usize)
Add to tokens generated.
Sourcepub fn set_nodes_processed(&mut self, count: usize)
pub fn set_nodes_processed(&mut self, count: usize)
Set nodes processed.
Sourcepub fn increment_summaries(&mut self)
pub fn increment_summaries(&mut self)
Increment summaries generated.
Sourcepub fn increment_nodes_skipped(&mut self)
pub fn increment_nodes_skipped(&mut self)
Increment nodes skipped.
Sourcepub fn increment_nodes_merged(&mut self)
pub fn increment_nodes_merged(&mut self)
Increment nodes merged.
Sourcepub fn total_time_ms(&self) -> u64
pub fn total_time_ms(&self) -> u64
Get total time.
Trait Implementations§
Source§impl Clone for IndexMetrics
impl Clone for IndexMetrics
Source§fn clone(&self) -> IndexMetrics
fn clone(&self) -> IndexMetrics
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 IndexMetrics
impl Debug for IndexMetrics
Source§impl Default for IndexMetrics
impl Default for IndexMetrics
Source§fn default() -> IndexMetrics
fn default() -> IndexMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IndexMetrics
impl<'de> Deserialize<'de> for IndexMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IndexMetrics
impl RefUnwindSafe for IndexMetrics
impl Send for IndexMetrics
impl Sync for IndexMetrics
impl Unpin for IndexMetrics
impl UnsafeUnpin for IndexMetrics
impl UnwindSafe for IndexMetrics
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