mod data_models#

module data_models#

Core prediction trie data types with NAT wire-format compatible serialization.

Structs and Unions

struct LlmCallPrediction#

Predictions for an LLM call at a given position in the call hierarchy.

remaining_calls: PredictionMetrics#

How many more LLM calls are expected after this one.

interarrival_ms: PredictionMetrics#

Expected time in milliseconds until the next LLM call.

output_tokens: PredictionMetrics#

Expected output token count for this call.

latency_sensitivity: Option<u32>#

Auto-computed latency sensitivity score from profiler analysis. None means no profiling data available – fall back to default.

struct PredictionMetrics#

Aggregated statistics for a single metric from profiler data.

sample_count: u32#

Number of samples.

mean: f64#

Mean value.

p50: f64#

50th percentile (median).

p90: f64#

90th percentile.

p95: f64#

95th percentile.

struct PredictionTrieNode#

A node in the prediction trie representing a function in the call hierarchy.

name: String#

Function name at this level in the hierarchy.

children: HashMap<String, PredictionTrieNode>#

Child nodes keyed by function name.

predictions_by_call_index: HashMap<u32, LlmCallPrediction>#

Predictions keyed by call index (1-indexed).

predictions_any_index: Option<LlmCallPrediction>#

Fallback predictions aggregated across all call indices.

Implementations

impl PredictionTrieNode#

Functions

fn new(name: impl Into<String>) -> Self#

Creates a new leaf node with the given name and no children or predictions.