#[non_exhaustive]pub struct HotpathLayer {}Expand description
HotpathLayer profiles every operation with
hotpath.
§Notes
When hotpath profiling is enabled, initialize a guard via
hotpath::HotpathGuardBuilder or #[hotpath::main] before running
operations. Otherwise, hotpath will panic on the first measurement.
§Examples
let _guard = hotpath::HotpathGuardBuilder::new("opendal").build();
let op = Operator::new(services::Memory::default())?
.layer(HotpathLayer::new());
op.write("test", "hello").await?;Implementations§
Source§impl HotpathLayer
impl HotpathLayer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new HotpathLayer.
Trait Implementations§
Source§impl Clone for HotpathLayer
impl Clone for HotpathLayer
Source§fn clone(&self) -> HotpathLayer
fn clone(&self) -> HotpathLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HotpathLayer
impl Debug for HotpathLayer
Source§impl Default for HotpathLayer
impl Default for HotpathLayer
Source§fn default() -> HotpathLayer
fn default() -> HotpathLayer
Returns the “default value” for a type. Read more
Source§impl Layer for HotpathLayer
impl Layer for HotpathLayer
Source§fn apply_service(&self, inner: Servicer) -> Servicer
fn apply_service(&self, inner: Servicer) -> Servicer
Intercept the operation service stack. Read more
Source§fn apply_context(
&self,
_srv: Servicer,
inner: OperationContext,
) -> OperationContext
fn apply_context( &self, _srv: Servicer, inner: OperationContext, ) -> OperationContext
Intercept the operation context (HTTP transport and executor). Read more
Auto Trait Implementations§
impl Freeze for HotpathLayer
impl RefUnwindSafe for HotpathLayer
impl Send for HotpathLayer
impl Sync for HotpathLayer
impl Unpin for HotpathLayer
impl UnsafeUnpin for HotpathLayer
impl UnwindSafe for HotpathLayer
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