Skip to main content

NormalizedEntry

Struct NormalizedEntry 

Source
pub struct NormalizedEntry {
Show 30 fields pub id: Option<String>, pub signal_type: String, pub name: Option<String>, pub rate: 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: EncoderConfig, pub sink: 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: OnSinkError,
}
Expand description

A single scenario entry with all defaults resolved.

Fields that could inherit from defaults: are now guaranteed to hold a concrete value (rate, encoder, sink). Fields that do not inherit (pack references, histogram/summary configuration, after clauses) are carried through unchanged.

This type is deliberately close in shape to Entry so that later compilation phases can walk the same field set without a translation step. The invariants above make the “missing rate/encoder/sink” states unrepresentable after normalization.

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. None for pack-backed entries.

§rate: f64

Event rate in events per second. Always set after normalization.

§duration: Option<String>

Total run duration (e.g. "30s", "5m"). None means “run until stopped” and is preserved through normalization.

§generator: Option<GeneratorConfig>

Value generator configuration (metrics signals only).

§log_generator: Option<LogGeneratorConfig>

Log generator configuration (logs signals only).

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

Static labels attached to every emitted event.

For inline entries this is the merged map of defaults.labels and the entry’s own labels, with entry keys winning on conflict.

For pack entries this is the entry’s own labels unchanged (possibly None). The file-level defaults.labels is NOT merged in — it is carried separately on NormalizedFile::defaults_labels so pack expansion can apply it at the correct precedence level. See the module docs for the full rationale.

§dynamic_labels: Option<Vec<DynamicLabelConfig>>

Dynamic (rotating) label configurations.

§encoder: EncoderConfig

Encoder configuration. Always set after normalization.

§sink: SinkConfig

Sink configuration. Always set after normalization.

§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 for 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: OnSinkError

Resolved sink-error policy.

Trait Implementations§

Source§

impl Clone for NormalizedEntry

Source§

fn clone(&self) -> NormalizedEntry

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 NormalizedEntry

Source§

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

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

impl Serialize for NormalizedEntry

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.