lightspeed/integration/async_driver
Async data engine and enterprise driver-layer contracts for M48.
Types
Deterministic benchmark sample.
pub type Benchmark {
Benchmark(
driver: String,
profile: BenchmarkProfile,
p50_latency_ms: Int,
p95_latency_ms: Int,
timeout_rate_bps: Int,
retry_rate_bps: Int,
throughput_ops_per_sec: Int,
)
}
Constructors
-
Benchmark( driver: String, profile: BenchmarkProfile, p50_latency_ms: Int, p95_latency_ms: Int, timeout_rate_bps: Int, retry_rate_bps: Int, throughput_ops_per_sec: Int, )
Benchmark profile class for M48 coverage.
pub type BenchmarkProfile {
HeavyData
MixedLatency
}
Constructors
-
HeavyData -
MixedLatency
Budget for one benchmark profile.
pub type Budget {
Budget(
profile: BenchmarkProfile,
max_p95_latency_ms: Int,
max_timeout_rate_bps: Int,
max_retry_rate_bps: Int,
min_throughput_ops_per_sec: Int,
)
}
Constructors
-
Budget( profile: BenchmarkProfile, max_p95_latency_ms: Int, max_timeout_rate_bps: Int, max_retry_rate_bps: Int, min_throughput_ops_per_sec: Int, )
One budget-check result.
pub type BudgetResult {
BudgetResult(
driver: String,
profile: BenchmarkProfile,
passed: Bool,
reason: String,
)
}
Constructors
-
BudgetResult( driver: String, profile: BenchmarkProfile, passed: Bool, reason: String, )
Driver capability contract.
pub type DriverCapability {
NonBlockingExecute
BoundedConcurrency
TimeoutTelemetry
RetryTelemetry
BatchRead
BatchWrite
CheckpointResume
IdempotentWrite
MixedLatencyTolerance
}
Constructors
-
NonBlockingExecute -
BoundedConcurrency -
TimeoutTelemetry -
RetryTelemetry -
BatchRead -
BatchWrite -
CheckpointResume -
IdempotentWrite -
MixedLatencyTolerance
Enterprise driver boundary class.
pub type DriverClass {
RelationalAdapter
ColumnarAdapter
StreamAdapter
ObjectStoreAdapter
}
Constructors
-
RelationalAdapter -
ColumnarAdapter -
StreamAdapter -
ObjectStoreAdapter
One enterprise async driver contract.
pub type DriverContract {
DriverContract(
name: String,
class: DriverClass,
provider_module: String,
max_in_flight: Int,
max_queue_depth: Int,
timeout_policy: TimeoutPolicy,
retry_policy: RetryPolicy,
telemetry: TelemetryProfile,
capabilities: List(DriverCapability),
support_tier: String,
tuning_guide: String,
)
}
Constructors
-
DriverContract( name: String, class: DriverClass, provider_module: String, max_in_flight: Int, max_queue_depth: Int, timeout_policy: TimeoutPolicy, retry_policy: RetryPolicy, telemetry: TelemetryProfile, capabilities: List(DriverCapability), support_tier: String, tuning_guide: String, )
Retry policy for one driver.
pub type RetryPolicy {
RetryPolicy(
max_attempts: Int,
base_backoff_ms: Int,
max_backoff_ms: Int,
jitter_percent: Int,
)
}
Constructors
-
RetryPolicy( max_attempts: Int, base_backoff_ms: Int, max_backoff_ms: Int, jitter_percent: Int, )
Timeout/retry/in-flight telemetry profile.
pub type TelemetryProfile {
TelemetryProfile(
timeout_metric: String,
retry_metric: String,
latency_metric: String,
in_flight_metric: String,
)
}
Constructors
-
TelemetryProfile( timeout_metric: String, retry_metric: String, latency_metric: String, in_flight_metric: String, )
Timeout policy for one driver.
pub type TimeoutPolicy {
TimeoutPolicy(connect_ms: Int, request_ms: Int, idle_ms: Int)
}
Constructors
-
TimeoutPolicy(connect_ms: Int, request_ms: Int, idle_ms: Int)
Values
pub fn benchmark_signature(benchmark: Benchmark) -> String
Stable benchmark signature.
pub fn budget_failures(results: List(BudgetResult)) -> Int
Count failing budget checks.
pub fn budget_result_signature(result: BudgetResult) -> String
Stable budget-check result signature.
pub fn capabilities(
driver: DriverContract,
) -> List(DriverCapability)
Driver capabilities accessor.
pub fn capability_label(capability: DriverCapability) -> String
Stable capability label.
pub fn capability_matrix_signature() -> String
Stable adapter capability matrix signature.
pub fn clickhouse_async_driver() -> DriverContract
Columnar analytics async driver.
pub fn contracts_consistent() -> Bool
True when all supported drivers are valid and policy-consistent.
pub fn driver_signature(driver: DriverContract) -> String
Stable driver contract signature.
pub fn evaluate_budgets(
benchmarks: List(Benchmark),
budgets: List(Budget),
) -> List(BudgetResult)
Evaluate benchmarks against M48 budgets.
pub fn object_store_async_driver() -> DriverContract
Object-store batch async driver.
pub fn profile_label(profile: BenchmarkProfile) -> String
Stable benchmark-profile label.
pub fn run_enterprise_benchmarks() -> List(Benchmark)
Run deterministic heavy-data and mixed-latency benchmark profiles.
pub fn supported_drivers() -> List(DriverContract)
Supported M48 enterprise drivers.
pub fn timeout_retry_telemetry_parity() -> Bool
True when timeout/retry telemetry contracts are consistent across drivers.