pub struct SketchTelemetryScratch {
pub ring_opcode: CountMinSketch,
pub active_opcode: CountMinSketch,
pub tenant: CountMinSketch,
pub status: CountMinSketch,
pub dispatch_metrics: CountMinSketch,
/* private fields */
}Expand description
Caller-owned scratch for repeated compact telemetry sketches.
Fields§
§ring_opcode: CountMinSketchRing slots by opcode, regardless of terminal status.
active_opcode: CountMinSketchActive ring slots by opcode.
tenant: CountMinSketchRing slots by tenant id.
status: CountMinSketchRing slots by raw status discriminant.
dispatch_metrics: CountMinSketchControl-buffer dispatch metrics by opcode metric index.
Implementations§
Source§impl SketchTelemetryScratch
impl SketchTelemetryScratch
Sourcepub fn new(depth: usize, width: usize) -> Result<Self, PipelineError>
pub fn new(depth: usize, width: usize) -> Result<Self, PipelineError>
Create reusable sketch scratch with the requested dimensions.
§Errors
Returns PipelineError when dimensions are invalid.
Sourcepub fn to_snapshot(&self) -> SketchTelemetry
pub fn to_snapshot(&self) -> SketchTelemetry
Convert this reusable scratch into an owned snapshot.
Sourcepub fn into_snapshot(self) -> SketchTelemetry
pub fn into_snapshot(self) -> SketchTelemetry
Move this scratch into an owned snapshot without cloning counter
arrays. Use this for one-shot sketches; keep Self::to_snapshot for
long-lived scratch that must be reused after sampling.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SketchTelemetryScratch
impl RefUnwindSafe for SketchTelemetryScratch
impl Send for SketchTelemetryScratch
impl Sync for SketchTelemetryScratch
impl Unpin for SketchTelemetryScratch
impl UnsafeUnpin for SketchTelemetryScratch
impl UnwindSafe for SketchTelemetryScratch
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