pub struct DebugLogger { /* private fields */ }Expand description
Debug logger with performance monitoring
Implementations§
Source§impl DebugLogger
impl DebugLogger
Sourcepub fn new(config: DebugConfig) -> Self
pub fn new(config: DebugConfig) -> Self
Create a new debug logger
Sourcepub fn start_timer(&mut self, operation: &str)
pub fn start_timer(&mut self, operation: &str)
Start a performance timer for an operation
Sourcepub fn end_timer(&mut self, operation: &str) -> Option<f64>
pub fn end_timer(&mut self, operation: &str) -> Option<f64>
End a performance timer and record metrics
Sourcepub fn log_model_loading(
&mut self,
model_name: &str,
size_bytes: usize,
source: &str,
)
pub fn log_model_loading( &mut self, model_name: &str, size_bytes: usize, source: &str, )
Log model loading operation
Sourcepub fn log_inference(
&mut self,
model_name: &str,
input_shape: &[usize],
device: &str,
)
pub fn log_inference( &mut self, model_name: &str, input_shape: &[usize], device: &str, )
Log inference operation
Sourcepub fn log_memory_usage(&mut self, context: &str)
pub fn log_memory_usage(&mut self, context: &str)
Log memory usage
Sourcepub fn log_gpu_operation(&mut self, operation: &str, buffer_size: usize)
pub fn log_gpu_operation(&mut self, operation: &str, buffer_size: usize)
Log GPU operation
Sourcepub fn get_performance_summary(&self) -> String
pub fn get_performance_summary(&self) -> String
Get performance summary
Sourcepub fn export_logs(&self) -> String
pub fn export_logs(&self) -> String
Export logs as formatted string
Sourcepub fn metrics_count(&self) -> usize
pub fn metrics_count(&self) -> usize
Get number of performance metrics
Trait Implementations§
Source§impl Clone for DebugLogger
impl Clone for DebugLogger
Source§fn clone(&self) -> DebugLogger
fn clone(&self) -> DebugLogger
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 From<DebugLogger> for JsValue
impl From<DebugLogger> for JsValue
Source§fn from(value: DebugLogger) -> Self
fn from(value: DebugLogger) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for DebugLogger
impl FromWasmAbi for DebugLogger
Source§impl IntoWasmAbi for DebugLogger
impl IntoWasmAbi for DebugLogger
Source§impl LongRefFromWasmAbi for DebugLogger
impl LongRefFromWasmAbi for DebugLogger
Source§impl OptionFromWasmAbi for DebugLogger
impl OptionFromWasmAbi for DebugLogger
Source§impl OptionIntoWasmAbi for DebugLogger
impl OptionIntoWasmAbi for DebugLogger
Source§impl RefFromWasmAbi for DebugLogger
impl RefFromWasmAbi for DebugLogger
Source§type Anchor = RcRef<DebugLogger>
type Anchor = RcRef<DebugLogger>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for DebugLogger
impl RefMutFromWasmAbi for DebugLogger
Source§impl TryFromJsValue for DebugLogger
impl TryFromJsValue for DebugLogger
Source§impl VectorFromWasmAbi for DebugLogger
impl VectorFromWasmAbi for DebugLogger
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[DebugLogger]>
Source§impl VectorIntoWasmAbi for DebugLogger
impl VectorIntoWasmAbi for DebugLogger
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[DebugLogger]>) -> Self::Abi
Source§impl WasmDescribeVector for DebugLogger
impl WasmDescribeVector for DebugLogger
impl SupportsConstructor for DebugLogger
impl SupportsInstanceProperty for DebugLogger
impl SupportsStaticProperty for DebugLogger
Auto Trait Implementations§
impl Freeze for DebugLogger
impl RefUnwindSafe for DebugLogger
impl Send for DebugLogger
impl Sync for DebugLogger
impl Unpin for DebugLogger
impl UnsafeUnpin for DebugLogger
impl UnwindSafe for DebugLogger
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.