pub struct ParserMetrics {
pub files_attempted: usize,
pub files_succeeded: usize,
pub files_failed: usize,
pub total_parse_time: Duration,
pub total_entities: usize,
pub total_relationships: usize,
pub peak_memory_bytes: Option<usize>,
}Expand description
Metrics collected during parsing
Fields§
§files_attempted: usizeTotal files attempted to parse
files_succeeded: usizeFiles successfully parsed
files_failed: usizeFiles that failed parsing
total_parse_time: DurationTotal time spent parsing
total_entities: usizeTotal entities extracted
total_relationships: usizeTotal relationships extracted
peak_memory_bytes: Option<usize>Peak memory usage (if available)
Implementations§
Source§impl ParserMetrics
impl ParserMetrics
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Success rate (0.0 to 1.0)
Sourcepub fn avg_parse_time(&self) -> Duration
pub fn avg_parse_time(&self) -> Duration
Average parse time per file
Sourcepub fn avg_entities_per_file(&self) -> f64
pub fn avg_entities_per_file(&self) -> f64
Average entities per file
Sourcepub fn merge(&mut self, other: &ParserMetrics)
pub fn merge(&mut self, other: &ParserMetrics)
Merge another metrics object into this one
Trait Implementations§
Source§impl Clone for ParserMetrics
impl Clone for ParserMetrics
Source§fn clone(&self) -> ParserMetrics
fn clone(&self) -> ParserMetrics
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 ParserMetrics
impl Debug for ParserMetrics
Source§impl Default for ParserMetrics
impl Default for ParserMetrics
Source§fn default() -> ParserMetrics
fn default() -> ParserMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParserMetrics
impl<'de> Deserialize<'de> for ParserMetrics
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ParserMetrics, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ParserMetrics, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ParserMetrics
impl PartialEq for ParserMetrics
Source§impl Serialize for ParserMetrics
impl Serialize for ParserMetrics
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ParserMetrics
Auto Trait Implementations§
impl Freeze for ParserMetrics
impl RefUnwindSafe for ParserMetrics
impl Send for ParserMetrics
impl Sync for ParserMetrics
impl Unpin for ParserMetrics
impl UnwindSafe for ParserMetrics
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> 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