pub struct LockGranularityAnalyzerV2<'a> { /* private fields */ }Expand description
Lightweight lock granularity analyzer using LockTrackerV2 (V2 - uses VarId).
This analyzer detects:
- Coarse-grained locks that can be split
- Critical sections that are too wide
- Mutex that can be replaced with RwLock
- Locks held across await points
Implementations§
Source§impl<'a> LockGranularityAnalyzerV2<'a>
impl<'a> LockGranularityAnalyzerV2<'a>
Sourcepub fn new(tracker: &'a LockTrackerV2) -> LockGranularityAnalyzerV2<'a>
pub fn new(tracker: &'a LockTrackerV2) -> LockGranularityAnalyzerV2<'a>
Create a new analyzer.
Sourcepub fn analyze(&self) -> Vec<LockSuggestion>
pub fn analyze(&self) -> Vec<LockSuggestion>
Analyze all critical sections and generate suggestions.
Sourcepub fn stats(&self) -> LockStatsV2
pub fn stats(&self) -> LockStatsV2
Get lock statistics.
Sourcepub fn tracker(&self) -> &LockTrackerV2
pub fn tracker(&self) -> &LockTrackerV2
Get the underlying LockTrackerV2.
Auto Trait Implementations§
impl<'a> Freeze for LockGranularityAnalyzerV2<'a>
impl<'a> RefUnwindSafe for LockGranularityAnalyzerV2<'a>
impl<'a> Send for LockGranularityAnalyzerV2<'a>
impl<'a> Sync for LockGranularityAnalyzerV2<'a>
impl<'a> Unpin for LockGranularityAnalyzerV2<'a>
impl<'a> UnsafeUnpin for LockGranularityAnalyzerV2<'a>
impl<'a> UnwindSafe for LockGranularityAnalyzerV2<'a>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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