pub struct UnicodeMonitor {
pub total_bytes_processed: AtomicU64,
pub total_unicode_bytes: AtomicU64,
pub total_sequences: AtomicU64,
pub total_errors: AtomicU64,
pub error_types: Mutex<HashMap<String, usize>>,
pub last_error: Mutex<Option<String>>,
pub processing_time_ns: AtomicU64,
pub max_buffer_size: AtomicUsize,
pub active_sessions: AtomicUsize,
pub total_sessions: AtomicUsize,
pub unicode_sessions: AtomicUsize,
}Expand description
Global unicode monitoring statistics
Fields§
§total_bytes_processed: AtomicU64§total_unicode_bytes: AtomicU64§total_sequences: AtomicU64§total_errors: AtomicU64§error_types: Mutex<HashMap<String, usize>>§last_error: Mutex<Option<String>>§processing_time_ns: AtomicU64§max_buffer_size: AtomicUsize§active_sessions: AtomicUsize§total_sessions: AtomicUsize§unicode_sessions: AtomicUsizeImplementations§
Source§impl UnicodeMonitor
impl UnicodeMonitor
Sourcepub fn record_processing(
&self,
bytes: usize,
unicode_bytes: usize,
contains_unicode: bool,
)
pub fn record_processing( &self, bytes: usize, unicode_bytes: usize, contains_unicode: bool, )
Record unicode processing statistics
Sourcepub fn record_error(&self, error_type: &str, details: &str)
pub fn record_error(&self, error_type: &str, details: &str)
Record a unicode error
Sourcepub fn record_processing_time(&self, nanoseconds: u64)
pub fn record_processing_time(&self, nanoseconds: u64)
Record processing time in nanoseconds
Sourcepub fn record_max_buffer_size(&self, size: usize)
pub fn record_max_buffer_size(&self, size: usize)
Record maximum buffer size encountered
Sourcepub fn start_session(&self)
pub fn start_session(&self)
Start a new unicode processing session
Sourcepub fn end_session(&self)
pub fn end_session(&self)
End a unicode processing session
Trait Implementations§
Source§impl Debug for UnicodeMonitor
impl Debug for UnicodeMonitor
Source§impl Default for UnicodeMonitor
impl Default for UnicodeMonitor
Source§fn default() -> UnicodeMonitor
fn default() -> UnicodeMonitor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for UnicodeMonitor
impl RefUnwindSafe for UnicodeMonitor
impl Send for UnicodeMonitor
impl Sync for UnicodeMonitor
impl Unpin for UnicodeMonitor
impl UnwindSafe for UnicodeMonitor
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