pub struct ProcessingStats {Show 38 fields
pub lines_read: usize,
pub lines_output: usize,
pub lines_filtered: usize,
pub lines_errors: usize,
pub events_created: usize,
pub events_output: usize,
pub events_filtered: usize,
pub late_events: usize,
pub files_processed: usize,
pub files_failed_to_open: usize,
pub failed_file_samples: Vec<String>,
pub recoverable_error_samples: Vec<String>,
pub script_executions: usize,
pub errors: usize,
pub processing_time: Duration,
pub start_time: Option<Instant>,
pub discovered_levels: BTreeSet<String>,
pub discovered_keys: BTreeSet<String>,
pub discovered_levels_output: BTreeSet<String>,
pub discovered_keys_output: BTreeSet<String>,
pub first_timestamp: Option<DateTime<Utc>>,
pub last_timestamp: Option<DateTime<Utc>>,
pub first_result_timestamp: Option<DateTime<Utc>>,
pub last_result_timestamp: Option<DateTime<Utc>>,
pub timestamp_detected_events: usize,
pub timestamp_parsed_events: usize,
pub timestamp_absent_events: usize,
pub timestamp_fields: IndexMap<String, TimestampFieldStat>,
pub timestamp_override_field: Option<String>,
pub timestamp_override_format: Option<String>,
pub timestamp_override_failed: bool,
pub timestamp_override_warning: Option<String>,
pub yearless_timestamps: usize,
pub detected_format: Option<String>,
pub detected_format_counts: IndexMap<String, usize>,
pub cascade_format_counts: IndexMap<String, usize>,
pub assertion_failures: usize,
pub assertion_failures_by_expr: HashMap<String, usize>,
}Expand description
Statistics collected during log processing
Fields§
§lines_read: usize§lines_output: usize§lines_filtered: usize§lines_errors: usize§events_created: usize§events_output: usize§events_filtered: usize§late_events: usize§files_processed: usize§files_failed_to_open: usize§failed_file_samples: Vec<String>§recoverable_error_samples: Vec<String>§script_executions: usize§errors: usize§processing_time: Duration§start_time: Option<Instant>§discovered_levels: BTreeSet<String>§discovered_keys: BTreeSet<String>§discovered_levels_output: BTreeSet<String>§discovered_keys_output: BTreeSet<String>§first_timestamp: Option<DateTime<Utc>>§last_timestamp: Option<DateTime<Utc>>§first_result_timestamp: Option<DateTime<Utc>>§last_result_timestamp: Option<DateTime<Utc>>§timestamp_detected_events: usize§timestamp_parsed_events: usize§timestamp_absent_events: usize§timestamp_fields: IndexMap<String, TimestampFieldStat>§timestamp_override_field: Option<String>§timestamp_override_format: Option<String>§timestamp_override_failed: bool§timestamp_override_warning: Option<String>§yearless_timestamps: usize§detected_format: Option<String>§detected_format_counts: IndexMap<String, usize>§cascade_format_counts: IndexMap<String, usize>Per-format event counts when running in cascade mode. Empty otherwise.
Keyed by the short format name used in _format (e.g. “json”, “line”).
assertion_failures: usize§assertion_failures_by_expr: HashMap<String, usize>Implementations§
Source§impl ProcessingStats
impl ProcessingStats
pub fn new() -> Self
Sourcepub fn extract_discovered_from_tracking(
&mut self,
tracking_data: &HashMap<String, Dynamic>,
)
pub fn extract_discovered_from_tracking( &mut self, tracking_data: &HashMap<String, Dynamic>, )
Extract discovered levels and keys from tracking data (for sequential processing)
Sourcepub fn format_stats(&self, _multiline_enabled: bool) -> String
pub fn format_stats(&self, _multiline_enabled: bool) -> String
Format stats according to the specification
Sourcepub fn format_stats_for_signal(
&self,
_multiline_enabled: bool,
include_line_counts: bool,
) -> String
pub fn format_stats_for_signal( &self, _multiline_enabled: bool, include_line_counts: bool, ) -> String
Format stats for signal handlers
include_line_counts should only be true when we have accurate mid-run
counters (e.g., sequential mode). Parallel mode uses partial stats, so
keep line counts suppressed there to avoid misleading zeros.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if any errors occurred during processing
Sourcepub fn format_error_summary(&self) -> String
pub fn format_error_summary(&self) -> String
Format a concise error summary for default output (when errors occur)
Trait Implementations§
Source§impl Clone for ProcessingStats
impl Clone for ProcessingStats
Source§fn clone(&self) -> ProcessingStats
fn clone(&self) -> ProcessingStats
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 ProcessingStats
impl Debug for ProcessingStats
Source§impl Default for ProcessingStats
impl Default for ProcessingStats
Source§fn default() -> ProcessingStats
fn default() -> ProcessingStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProcessingStats
impl RefUnwindSafe for ProcessingStats
impl Send for ProcessingStats
impl Sync for ProcessingStats
impl Unpin for ProcessingStats
impl UnsafeUnpin for ProcessingStats
impl UnwindSafe for ProcessingStats
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> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant trait object to Box<dyn Any>.