E-Ink News Daily

Back to list

Timesliced reservoir sampling: a new(?) algorithm for profilers

The article introduces a novel variant of reservoir sampling called 'timesliced reservoir sampling' designed specifically for profilers. This algorithm addresses limitations of traditional reservoir sampling by ensuring samples are evenly distributed across time, which is crucial for generating accurate performance timelines. The technique is particularly valuable for continuous profiling of long-running applications where storing all data is impractical.

Background

Reservoir sampling is a family of algorithms used to randomly sample from data streams of unknown length, commonly employed in profilers to capture call stacks without storing all data. Traditional methods can suffer from uneven time distribution of samples.

Source
Lobsters
Published
Apr 2, 2026 at 12:31 AM
Score
7.0 / 10