Skip to main content

representable_samples

Function representable_samples 

Source
pub(crate) fn representable_samples(
    first_sample_unix_ns: u64,
    sample_interval_ns: u64,
    count: usize,
) -> usize
Expand description

Counts the leading samples of a scan whose timestamps fit in an i64.

These are exactly the indices for which sample_timestamp_ns succeeds.

§Arguments

  • first_sample_unix_ns - Time of the scan’s first sample, in Unix nanoseconds.
  • sample_interval_ns - Time between samples, in nanoseconds.
  • count - Number of samples in the scan.