pub struct DdSketchAggregator { /* private fields */ }metrics only.Expand description
DDSKetch quantile sketch algorithm
It can give q-quantiles with α-accurate for any 0<=q<=1.
Here the accurate is calculated based on relative-error rate. Thus, the error guarantee adapts the scale of the output data. With relative error guarantee, the histogram can be more accurate in the area of low data density. For example, the long tail of response time data.
For example, if the actual percentile is 1 second, and relative-error guarantee is 2%, then the value should within the range of 0.98 to 1.02 second. But if the actual percentile is 1 millisecond, with the same relative-error guarantee, the value returned should within the range of 0.98 to 1.02 millisecond.
In order to support both negative and positive inputs, DDSketchAggregator has two DDSketch store within itself to store the negative and positive inputs.
Implementations§
Source§impl DdSketchAggregator
impl DdSketchAggregator
Sourcepub fn new(config: &DdSketchConfig, kind: NumberKind) -> DdSketchAggregator
pub fn new(config: &DdSketchConfig, kind: NumberKind) -> DdSketchAggregator
Create a new DDSKetchAggregator that would yield a quantile with relative error rate less
than alpha
The input should have a granularity larger than key_epsilon
Trait Implementations§
Source§impl Aggregator for DdSketchAggregator
impl Aggregator for DdSketchAggregator
Source§fn update(&self, number: &Number, descriptor: &Descriptor) -> Result<()>
fn update(&self, number: &Number, descriptor: &Descriptor) -> Result<()>
Source§fn synchronized_move(
&self,
destination: &Arc<dyn Aggregator + Send + Sync>,
descriptor: &Descriptor,
) -> Result<()>
fn synchronized_move( &self, destination: &Arc<dyn Aggregator + Send + Sync>, descriptor: &Descriptor, ) -> Result<()>
Source§fn merge(
&self,
other: &(dyn Aggregator + Send + Sync),
_descriptor: &Descriptor,
) -> Result<()>
fn merge( &self, other: &(dyn Aggregator + Send + Sync), _descriptor: &Descriptor, ) -> Result<()>
Aggregator into this
Aggregator. merge is not synchronized with respect to update or
synchronized_move. Read moreSource§impl Count for DdSketchAggregator
impl Count for DdSketchAggregator
Source§impl Debug for DdSketchAggregator
impl Debug for DdSketchAggregator
Source§impl Default for DdSketchAggregator
impl Default for DdSketchAggregator
Source§impl Max for DdSketchAggregator
impl Max for DdSketchAggregator
Source§impl Min for DdSketchAggregator
impl Min for DdSketchAggregator
Source§impl Sum for DdSketchAggregator
impl Sum for DdSketchAggregator
impl MinMaxSumCount for DdSketchAggregator
Auto Trait Implementations§
impl !Freeze for DdSketchAggregator
impl RefUnwindSafe for DdSketchAggregator
impl Send for DdSketchAggregator
impl Sync for DdSketchAggregator
impl Unpin for DdSketchAggregator
impl UnwindSafe for DdSketchAggregator
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
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>
trace only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
trace only.