Expand description
The combinator module provides a set of combinators for building complex
DurationSampler instances from simpler ones.
These combinators allow for fluent, declarative construction of sampling logic, including mapping, delaying, jittering, chaining, aggregating, clamping, and ensuring non-negative durations.
Structs§
- Aggregate
Builder - A builder for constructing an
AggregateSamplerin a fluent manner. - Aggregate
Sampler - A sampler that aggregates results from multiple sub-samplers using a closure.
- Chain
Sampler - A sampler that chains two sub-samplers together, combining their results using a closure.
- Clamp
Sampler - A sampler that clamps the sampled value within the specified [min, max] range.
- Delay
Sampler - A sampler that delays the output of a base sampler by adding the value from a delay sampler.
- Ensure
NonNegative Sampler - A sampler that ensures the sampled duration is non-negative.
- Jitter
Sampler - A sampler that applies “jitter” (noise) to the output of a base sampler.
- MapSampler
- A sampler that maps the output of a base sampler to a new value using a closure.