pub enum Interval {
Frequency(u64),
Period(u64),
}
Expand description
How often the per-cpu sampling will occur. Not guaranteed to be honored as the kernel can throttle the sampling rate if it’s too high. If unset, an implementation-defined default is used.
Variants§
Frequency(u64)
Per-cpu sampling frequency in Hz, as requested from the kernel. Not the same as 1/period. Details: the actual sampling will still be based on a period, but the kernel will dynamically adjust it based on the observed event rate, to approximate this frequency. Works best with steady-rate events like timers.
Period(u64)
Per-cpu sampling will occur every |period| counts of |event|. Prefer |frequency| by default, as it’s easier to oversample with a fixed period.
Implementations§
Source§impl Interval
impl Interval
Sourcepub fn merge<B>(
field: &mut Option<Interval>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<Interval>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.