Cyclium. ServiceLevels
(Cyclium v0.1.5)
Copy Markdown
ETS-backed performance objectives tracking per expectation.
Tracks episode duration and success rate, and detects breaches against declared performance objectives.
Configuration
Set service_levels on an expectation:
expect :check_health,
service_levels: %{max_duration_ms: 30_000, success_rate: 0.95, window_episodes: 50}ETS layout
Key: {actor_id, expectation_id}
Value: %{config: map, samples: [map], ...}
Summary
Functions
Check if performance objectives are being met.
Idempotent ETS table creation.
Get current metrics for an expectation.
Record an episode outcome.
Register performance objectives config for an expectation.
Functions
Check if performance objectives are being met.
Returns :ok or {:breach, details}.
Idempotent ETS table creation.
Get current metrics for an expectation.
Record an episode outcome.
measurements should include:
:duration_ms— episode wall-clock time in milliseconds:success— boolean
Register performance objectives config for an expectation.