lightspeed/ops/performance_harness
Deterministic benchmark harness for M11 performance parity gate.
Types
Scenario budget used for parity gating.
pub type Budget {
Budget(
workload: Workload,
max_p95_latency_ms: Int,
max_avg_payload_bytes: Int,
min_throughput_events_per_second: Int,
max_memory_units_per_session: Int,
)
}
Constructors
-
Budget( workload: Workload, max_p95_latency_ms: Int, max_avg_payload_bytes: Int, min_throughput_events_per_second: Int, max_memory_units_per_session: Int, )
Pinned deterministic profile used by the benchmark harness.
pub type Profile {
Profile(
name: String,
cpu_units: Int,
io_units: Int,
memory_units: Int,
)
}
Constructors
-
Profile( name: String, cpu_units: Int, io_units: Int, memory_units: Int, )
Full benchmark report for one profile and scenario suite.
pub type Report {
Report(profile: Profile, scenarios: List(ScenarioReport))
}
Constructors
-
Report(profile: Profile, scenarios: List(ScenarioReport))
Per-workload scenario report.
pub type ScenarioReport {
ScenarioReport(
workload: Workload,
session_count: Int,
events_per_session: Int,
total_events: Int,
p50_latency_ms: Int,
p95_latency_ms: Int,
total_payload_bytes: Int,
avg_payload_bytes: Int,
total_patch_ops: Int,
avg_patch_ops: Int,
peak_memory_units_per_session: Int,
estimated_total_memory_units: Int,
throughput_events_per_second: Int,
)
}
Constructors
-
ScenarioReport( workload: Workload, session_count: Int, events_per_session: Int, total_events: Int, p50_latency_ms: Int, p95_latency_ms: Int, total_payload_bytes: Int, avg_payload_bytes: Int, total_patch_ops: Int, avg_patch_ops: Int, peak_memory_units_per_session: Int, estimated_total_memory_units: Int, throughput_events_per_second: Int, )
Benchmark workload categories for M11.
pub type Workload {
Counter
CrudTable
StreamHeavyList
FormHeavyFlow
}
Constructors
-
Counter -
CrudTable -
StreamHeavyList -
FormHeavyFlow
Values
pub fn budget_failures(results: List(BudgetResult)) -> Int
Count failing budget checks.
pub fn default_suite() -> List(Scenario)
Default benchmark suite for M11: counter, CRUD table, stream-heavy list, and form-heavy flow.
pub fn evaluate_budget(
report: Report,
budgets: List(Budget),
) -> List(BudgetResult)
Evaluate one report against one budget list.
pub fn pinned_profile() -> Profile
Deterministic pinned profile for M11 reproducibility.
pub fn report_signature(report: Report) -> String
Stable report signature suitable for CI artifact comparisons.