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

Result of checking one scenario against a budget.

pub type BudgetResult {
  BudgetResult(workload: Workload, passed: Bool, reason: String)
}

Constructors

  • BudgetResult(workload: Workload, passed: Bool, reason: String)

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

Workload benchmark specification.

pub type Scenario {
  Scenario(
    workload: Workload,
    session_count: Int,
    events_per_session: Int,
  )
}

Constructors

  • Scenario(
      workload: Workload,
      session_count: Int,
      events_per_session: Int,
    )

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 budget_label(result: BudgetResult) -> String

Stable pass/fail label.

pub fn default_budget() -> List(Budget)

Default parity budget for M11 gate 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.

pub fn run_suite() -> Report

Run benchmarks with pinned profile and default suite.

pub fn run_suite_with(
  profile: Profile,
  suite: List(Scenario),
) -> Report

Run benchmarks for one profile and scenario list.

pub fn workload_label(workload: Workload) -> String

Stable workload label.

Search Document