pub struct AdaptiveRotationConfig { /* private fields */ }Expand description
Sets the rotation period from the observed byte rate, so segments land near
a target size and stay under max_file_size. Opt in with
adaptive_rotation on DiskBuffer::builder or MemoryBuffer::builder.
The period starts at min_period and grows toward max_period as the
observed rate allows.
Implementations§
Source§impl AdaptiveRotationConfig
impl AdaptiveRotationConfig
Sourcepub fn min_period(self, period: Duration) -> Self
pub fn min_period(self, period: Duration) -> Self
Shortest period to adapt to. Every rotation drains all registered thread-local buffers, so this bounds that cost. Defaults to 5s.
Sourcepub fn max_period(self, period: Duration) -> Self
pub fn max_period(self, period: Duration) -> Self
Longest period to adapt to. Defaults to the writer’s rotation_period.
Sourcepub fn target_bytes(self, bytes: u64) -> Self
pub fn target_bytes(self, bytes: u64) -> Self
Bytes each segment aims for. Defaults to 80% of max_file_size, leaving
room for a rate that rises within a segment.
Trait Implementations§
Source§impl Clone for AdaptiveRotationConfig
impl Clone for AdaptiveRotationConfig
Source§fn clone(&self) -> AdaptiveRotationConfig
fn clone(&self) -> AdaptiveRotationConfig
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 moreimpl Copy for AdaptiveRotationConfig
Source§impl Debug for AdaptiveRotationConfig
impl Debug for AdaptiveRotationConfig
Source§impl Default for AdaptiveRotationConfig
impl Default for AdaptiveRotationConfig
impl Eq for AdaptiveRotationConfig
Source§impl PartialEq for AdaptiveRotationConfig
impl PartialEq for AdaptiveRotationConfig
impl StructuralPartialEq for AdaptiveRotationConfig
Auto Trait Implementations§
impl Freeze for AdaptiveRotationConfig
impl RefUnwindSafe for AdaptiveRotationConfig
impl Send for AdaptiveRotationConfig
impl Sync for AdaptiveRotationConfig
impl Unpin for AdaptiveRotationConfig
impl UnsafeUnpin for AdaptiveRotationConfig
impl UnwindSafe for AdaptiveRotationConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
Write
value to writerSource§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
Write
value to writer