pub struct WasmProfiler { /* private fields */ }Expand description
WASM bindings for profiler
Implementations§
Source§impl WasmProfiler
impl WasmProfiler
Sourcepub fn start_timer(&mut self, name: &str)
pub fn start_timer(&mut self, name: &str)
Starts a timer
Sourcepub fn stop_timer(&mut self, name: &str)
pub fn stop_timer(&mut self, name: &str)
Stops a timer
Sourcepub fn record_memory(&mut self)
pub fn record_memory(&mut self)
Records current memory usage
Sourcepub fn get_counter_stats(&self, name: &str) -> Option<String>
pub fn get_counter_stats(&self, name: &str) -> Option<String>
Returns counter statistics as JSON
Sourcepub fn get_all_stats(&self) -> String
pub fn get_all_stats(&self) -> String
Returns all statistics as JSON
Trait Implementations§
Source§impl From<WasmProfiler> for JsValue
impl From<WasmProfiler> for JsValue
Source§fn from(value: WasmProfiler) -> Self
fn from(value: WasmProfiler) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmProfiler
impl FromWasmAbi for WasmProfiler
Source§impl IntoWasmAbi for WasmProfiler
impl IntoWasmAbi for WasmProfiler
Source§impl LongRefFromWasmAbi for WasmProfiler
impl LongRefFromWasmAbi for WasmProfiler
Source§impl OptionFromWasmAbi for WasmProfiler
impl OptionFromWasmAbi for WasmProfiler
Source§impl OptionIntoWasmAbi for WasmProfiler
impl OptionIntoWasmAbi for WasmProfiler
Source§impl RefFromWasmAbi for WasmProfiler
impl RefFromWasmAbi for WasmProfiler
Source§type Anchor = RcRef<WasmProfiler>
type Anchor = RcRef<WasmProfiler>
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 WasmProfiler
impl RefMutFromWasmAbi for WasmProfiler
Source§impl TryFromJsValue for WasmProfiler
impl TryFromJsValue for WasmProfiler
Source§impl VectorFromWasmAbi for WasmProfiler
impl VectorFromWasmAbi for WasmProfiler
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmProfiler]>
Source§impl VectorIntoWasmAbi for WasmProfiler
impl VectorIntoWasmAbi for WasmProfiler
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmProfiler]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmProfiler
impl WasmDescribeVector for WasmProfiler
impl SupportsConstructor for WasmProfiler
impl SupportsInstanceProperty for WasmProfiler
impl SupportsStaticProperty for WasmProfiler
Auto Trait Implementations§
impl Freeze for WasmProfiler
impl RefUnwindSafe for WasmProfiler
impl Send for WasmProfiler
impl Sync for WasmProfiler
impl Unpin for WasmProfiler
impl UnsafeUnpin for WasmProfiler
impl UnwindSafe for WasmProfiler
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> 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.