Skip to main content

BaseScheduleConfig

Struct BaseScheduleConfig 

Source
pub struct BaseScheduleConfig {
Show 15 fields pub name: String, pub rate: f64, pub duration: Option<String>, pub gaps: Option<GapConfig>, pub bursts: Option<BurstConfig>, pub cardinality_spikes: Option<Vec<CardinalitySpikeConfig>>, pub dynamic_labels: Option<Vec<DynamicLabelConfig>>, pub labels: Option<HashMap<String, String>>, pub sink: SinkConfig, pub phase_offset: Option<String>, pub clock_group: Option<String>, pub clock_group_is_auto: Option<bool>, pub jitter: Option<f64>, pub jitter_seed: Option<u64>, pub on_sink_error: OnSinkError,
}
Expand description

Shared schedule and delivery fields common to all signal types.

Both ScenarioConfig (metrics) and LogScenarioConfig (logs) embed this struct via #[serde(flatten)]. It contains every field that is identical across signal types — everything except the generator configuration and the encoder default.

New schedule-level fields (rate control, windows, labels, sink, phase offset) should be added here once and automatically propagate to both signal types.

Fields§

§name: String

Scenario name (metric name for metrics, identifier for logs).

§rate: f64

Target event rate in events per second. Must be strictly positive.

§duration: Option<String>

Optional total run duration (e.g. "30s", "5m"). None means run indefinitely.

§gaps: Option<GapConfig>

Optional gap window: recurring silent periods in the event stream.

§bursts: Option<BurstConfig>

Optional burst window: recurring high-rate periods in the event stream.

When both a gap and a burst overlap in time, the gap takes priority.

§cardinality_spikes: Option<Vec<CardinalitySpikeConfig>>

Optional cardinality spikes: recurring windows that inject dynamic labels to simulate cardinality explosions.

§dynamic_labels: Option<Vec<DynamicLabelConfig>>

Optional dynamic labels: always-on rotating label values that cycle through a fixed set of values on every tick.

Unlike CardinalitySpikeConfig, dynamic labels are never gated by a time window — they appear in every emitted event. Use this to simulate a fleet of N hosts, pods, or regions.

§labels: Option<HashMap<String, String>>

Static labels attached to every emitted event.

§sink: SinkConfig

Output sink. Defaults to stdout.

§phase_offset: Option<String>

Delay before starting this scenario, relative to the group start time.

Only meaningful in multi-scenario mode. Enables temporal correlation between scenarios: “metric A starts immediately, metric B starts 30s later”. Accepts a duration string (e.g. "30s", "1m", "500ms").

§clock_group: Option<String>

Clock group identifier for multi-scenario correlation.

Scenarios with the same clock_group value share a common start time reference. For MVP this provides a shared start reference only; advanced cross-scenario signaling is deferred to a future phase.

§clock_group_is_auto: Option<bool>

Provenance of Self::clock_group from the v2 compiler.

Populated by crate::compiler::prepare when an entry traverses the v2 compile pipeline. Carries:

  • Some(true) — the compiler synthesized chain_{lowest_lex_id} because the after: component had no user-supplied clock_group.
  • Some(false) — the value was adopted from an explicit user assignment (including explicit values that happen to start with chain_).
  • None — the entry did not flow through the v2 compiler (v1 loaders, hand-built configs); display code must not show an (auto) marker.

Hidden from YAML serialization because it is a compiler-derived field, not user-supplied input. Skipped from deserialization for the same reason — round-tripping a config never resurrects this flag.

§jitter: Option<f64>

Optional jitter amplitude. When set, adds uniform noise in [-jitter, +jitter] to every generated value. Defaults to None (no jitter).

§jitter_seed: Option<u64>

Optional seed for jitter noise. Defaults to 0 when absent. Different seeds produce different noise sequences.

§on_sink_error: OnSinkError

Behavior when a sink write returns an I/O error mid-run.

Trait Implementations§

Source§

impl Clone for BaseScheduleConfig

Source§

fn clone(&self) -> BaseScheduleConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BaseScheduleConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BaseScheduleConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for BaseScheduleConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,