lightspeed/ops/hot_path_harness
Deterministic runtime hot-path optimization harness for M35.
Types
Per-scenario regression budgets.
pub type Budget {
Budget(
scenario: Scenario,
min_p95_latency_improvement_ms: Int,
min_throughput_gain: Int,
min_allocation_reduction_units: Int,
)
}
Constructors
-
Budget( scenario: Scenario, min_p95_latency_improvement_ms: Int, min_throughput_gain: Int, min_allocation_reduction_units: Int, )
Hot-path profile metrics.
pub type Metrics {
Metrics(
p50_latency_ms: Int,
p95_latency_ms: Int,
throughput_events_per_second: Int,
memory_units: Int,
allocation_units: Int,
)
}
Constructors
-
Metrics( p50_latency_ms: Int, p95_latency_ms: Int, throughput_events_per_second: Int, memory_units: Int, allocation_units: Int, )
Full M35 report.
pub type Report {
Report(
outcomes: List(ScenarioOutcome),
budget_results: List(BudgetResult),
failed_scenarios: Int,
nondeterministic_failures: Int,
failed_budgets: Int,
)
}
Constructors
-
Report( outcomes: List(ScenarioOutcome), budget_results: List(BudgetResult), failed_scenarios: Int, nondeterministic_failures: Int, failed_budgets: Int, )
M35 hot-path scenarios.
pub type Scenario {
SessionEventPatchLoop
TransportAckPressureLoop
ReconnectRecoveryLoop
}
Constructors
-
SessionEventPatchLoop -
TransportAckPressureLoop -
ReconnectRecoveryLoop
Values
pub fn baseline_metrics(outcome: ScenarioOutcome) -> Metrics
Baseline metrics accessor.
pub fn budget_failures(results: List(BudgetResult)) -> Int
Number of failing budget checks.
pub const budget_version: Int
pub fn evaluate_budget(
outcomes: List(ScenarioOutcome),
budgets: List(Budget),
) -> List(BudgetResult)
Evaluate one outcome list against one budget profile.
pub fn nondeterministic_failures(report: Report) -> Int
Nondeterministic failure count.
pub fn optimized_metrics(outcome: ScenarioOutcome) -> Metrics
Optimized metrics accessor.
pub fn run_scenario(scenario: Scenario) -> ScenarioOutcome
Run one M35 scenario twice and require deterministic parity.
pub fn snapshot_report_markdown() -> String
Deterministic markdown report for M35 fixture scripts.
pub fn snapshot_signature() -> String
Deterministic snapshot signature for M35 drift gates.
pub const snapshot_version: Int