pub struct HistogramScenarioConfig {
pub base: BaseScheduleConfig,
pub buckets: Option<Vec<f64>>,
pub distribution: DistributionConfig,
pub observations_per_tick: Option<u64>,
pub mean_shift_per_sec: Option<f64>,
pub seed: Option<u64>,
pub encoder: EncoderConfig,
}Expand description
Full configuration for a single histogram scenario run.
Embeds BaseScheduleConfig for the shared schedule and delivery fields,
adding histogram-specific parameters: bucket boundaries, distribution model,
observations per tick, mean shift, and seed.
§Example YAML
signal_type: histogram
name: http_request_duration_seconds
rate: 1
duration: 5m
buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0]
distribution:
type: exponential
rate: 10.0
observations_per_tick: 100
seed: 42
labels:
method: GET
encoder:
type: prometheus_text
sink:
type: stdoutFields§
§base: BaseScheduleConfigShared schedule and delivery fields.
buckets: Option<Vec<f64>>Histogram bucket upper bounds. When None, uses the default Prometheus
bucket boundaries: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0].
distribution: DistributionConfigDistribution model for generating observations.
observations_per_tick: Option<u64>Number of observations to sample per tick. Defaults to 100.
mean_shift_per_sec: Option<f64>Linear drift applied to the distribution center per second. Defaults to 0.0.
seed: Option<u64>Determinism seed for the RNG. Defaults to 0.
encoder: EncoderConfigOutput encoder. Defaults to prometheus_text.
Trait Implementations§
Source§impl Clone for HistogramScenarioConfig
impl Clone for HistogramScenarioConfig
Source§fn clone(&self) -> HistogramScenarioConfig
fn clone(&self) -> HistogramScenarioConfig
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 moreSource§impl Debug for HistogramScenarioConfig
impl Debug for HistogramScenarioConfig
Source§impl Deref for HistogramScenarioConfig
impl Deref for HistogramScenarioConfig
Source§type Target = BaseScheduleConfig
type Target = BaseScheduleConfig
The resulting type after dereferencing.
Source§fn deref(&self) -> &BaseScheduleConfig
fn deref(&self) -> &BaseScheduleConfig
Dereferences the value.
Source§impl DerefMut for HistogramScenarioConfig
impl DerefMut for HistogramScenarioConfig
Source§fn deref_mut(&mut self) -> &mut BaseScheduleConfig
fn deref_mut(&mut self) -> &mut BaseScheduleConfig
Mutably dereferences the value.
Source§impl<'de> Deserialize<'de> for HistogramScenarioConfig
impl<'de> Deserialize<'de> for HistogramScenarioConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HistogramScenarioConfig
impl RefUnwindSafe for HistogramScenarioConfig
impl Send for HistogramScenarioConfig
impl Sync for HistogramScenarioConfig
impl Unpin for HistogramScenarioConfig
impl UnsafeUnpin for HistogramScenarioConfig
impl UnwindSafe for HistogramScenarioConfig
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