Skip to main content

Entry

Struct Entry 

Source
pub struct Entry {
Show 30 fields pub id: Option<String>, pub signal_type: String, pub name: Option<String>, pub rate: Option<f64>, pub duration: Option<String>, pub generator: Option<GeneratorConfig>, pub log_generator: Option<LogGeneratorConfig>, pub labels: Option<BTreeMap<String, String>>, pub dynamic_labels: Option<Vec<DynamicLabelConfig>>, pub encoder: Option<EncoderConfig>, pub sink: Option<SinkConfig>, pub jitter: Option<f64>, pub jitter_seed: Option<u64>, pub gaps: Option<GapConfig>, pub bursts: Option<BurstConfig>, pub cardinality_spikes: Option<Vec<CardinalitySpikeConfig>>, pub phase_offset: Option<String>, pub clock_group: Option<String>, pub after: Option<AfterClause>, pub while_clause: Option<WhileClause>, pub delay_clause: Option<DelayClause>, pub pack: Option<String>, pub overrides: Option<BTreeMap<String, MetricOverride>>, pub distribution: Option<DistributionConfig>, pub buckets: Option<Vec<f64>>, pub quantiles: Option<Vec<f64>>, pub observations_per_tick: Option<u32>, pub mean_shift_per_sec: Option<f64>, pub seed: Option<u64>, pub on_sink_error: Option<OnSinkError>,
}
Expand description

A single scenario entry in a v2 file.

An entry is either an inline signal (has generator and name) or a pack reference (has pack). The two forms are mutually exclusive, enforced at parse time.

All fields are optional in the struct to support flexible YAML authoring. Semantic validation (required fields, mutual exclusion) is performed by parse::parse.

Fields§

§id: Option<String>

Unique identifier for causal dependency references (after.ref).

§signal_type: String

Signal type: "metrics", "logs", "histogram", or "summary".

§name: Option<String>

Metric or scenario name. Required for inline entries.

§rate: Option<f64>

Event rate in events per second.

§duration: Option<String>

Total run duration (e.g. "30s", "5m").

§generator: Option<GeneratorConfig>

Value generator configuration (for metrics).

§log_generator: Option<LogGeneratorConfig>

Log generator configuration (for logs signal type).

Mutually exclusive with generator — an entry uses one or the other depending on signal_type.

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

Static labels attached to every emitted event.

§dynamic_labels: Option<Vec<DynamicLabelConfig>>

Dynamic (rotating) label configurations.

§encoder: Option<EncoderConfig>

Encoder configuration for this entry.

§sink: Option<SinkConfig>

Sink configuration for this entry.

§jitter: Option<f64>

Jitter amplitude applied to generated values.

§jitter_seed: Option<u64>

Deterministic seed for jitter RNG.

§gaps: Option<GapConfig>

Recurring silent-period configuration.

§bursts: Option<BurstConfig>

Recurring high-rate burst configuration.

§cardinality_spikes: Option<Vec<CardinalitySpikeConfig>>

Cardinality spike configurations.

§phase_offset: Option<String>

Phase offset for staggered start within a clock group.

§clock_group: Option<String>

Clock group for coordinated timing across entries.

§after: Option<AfterClause>

Causal dependency on another signal’s value.

§while_clause: Option<WhileClause>

Continuous lifecycle gate on another signal’s value.

§delay_clause: Option<DelayClause>

Open / close debounce windows applied to while_clause transitions.

§pack: Option<String>

Pack name or file path. Mutually exclusive with generator.

§overrides: Option<BTreeMap<String, MetricOverride>>

Per-metric overrides within the referenced pack.

§distribution: Option<DistributionConfig>

Distribution model for histogram or summary observations.

§buckets: Option<Vec<f64>>

Histogram bucket boundaries (histogram only).

§quantiles: Option<Vec<f64>>

Summary quantile boundaries (summary only).

§observations_per_tick: Option<u32>

Number of observations sampled per tick.

§mean_shift_per_sec: Option<f64>

Linear drift applied to the distribution mean each second.

§seed: Option<u64>

Deterministic seed for histogram/summary sampling.

§on_sink_error: Option<OnSinkError>

Per-entry sink-error policy (overrides defaults).

Trait Implementations§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Entry

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 Entry

Source§

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

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

impl<'de> Deserialize<'de> for Entry

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 Entry

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§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

§

impl UnwindSafe for Entry

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>,