You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#304 established where KPI definitions live (tools/infrastructure/sql/kpi_views.sql), how they
reach a database, how they are tested and how they are charted — and shipped exactly one metric
through that path: availability and uptime. This issue finishes the starter set.
The conventions are set and should not be re-litigated: dc_kpi_* naming, one view that
normalises the wide dc table per Measurement, the window as a function argument so a panel
reports the range on screen, a bucketed view for charting, a fixture test that seeds a known
Record sequence, and panels added to the provisioned dc-kpi dashboard.
View
Reports
Reads Records from
Utilisation
Productive time over available time, per robot per window
driving_type and speed — both already collected
Intervention rate
Interventions per hour of autonomous operation, and per kilometre
intervention, driving_type, distance_traveled
Mission success rate
Completed, failed, cancelled and aborted missions as a share of missions started
the Mission Measurement
MTBF / MTTR
Mean time between failures and mean time to repair
Definitions that are honest about what they cannot see beat definitions that look complete.
Availability in #304 documents that a robot silent since before the window drops out rather than
reading 0 %; the same standard applies here — open intervals, missing denominators and
mission-less windows get documented behaviour, not a plausible-looking number.
Acceptance criteria
A utilisation view: productive time over available time, over an arbitrary window, per robot
An intervention-rate view, normalised per hour of autonomous operation and per kilometre travelled
A mission success-rate view, with outcomes broken out rather than collapsed to a single ratio
MTBF and MTTR views, over the fault Measurement's raise and clear Records
Open intervals (a mission or intervention still running) are excluded or explicitly handled, never treated as zero duration
The fixture test (tools/infrastructure/test/test_kpi_views.py) gains a case per metric, seeded with a known Record sequence — this is where a definition change must break a test
Panels for each metric on the provisioned dc-kpi dashboard, populated by the demo stack
doc/src/dc/kpi_views.md documents each metric's definition and what it deliberately does not claim
What to build
#304 established where KPI definitions live (
tools/infrastructure/sql/kpi_views.sql), how theyreach a database, how they are tested and how they are charted — and shipped exactly one metric
through that path: availability and uptime. This issue finishes the starter set.
The conventions are set and should not be re-litigated:
dc_kpi_*naming, one view thatnormalises the wide
dctable per Measurement, the window as a function argument so a panelreports the range on screen, a bucketed view for charting, a fixture test that seeds a known
Record sequence, and panels added to the provisioned
dc-kpidashboard.driving_typeandspeed— both already collectedintervention,driving_type,distance_traveledfaultMeasurement (#365)Two prerequisites are worth stating plainly rather than discovering during implementation:
still being agreed in Agree the mission lifecycle contract for the Mission Measurement #305. Utilisation and intervention rate do not depend on it.
until the
faultMeasurement in Add Measurement: fault — raise and clear events from diagnostics, so MTBF and MTTR have a source #365 lands.diagnosticsrecords snapshots, not transitions,and reconstructing a transition from snapshots gives a wrong duration whenever a Record is
dropped.
Definitions that are honest about what they cannot see beat definitions that look complete.
Availability in #304 documents that a robot silent since before the window drops out rather than
reading 0 %; the same standard applies here — open intervals, missing denominators and
mission-less windows get documented behaviour, not a plausible-looking number.
Acceptance criteria
dc_kpi_*naming, the window as a query parameter,CREATE OR REPLACE, no dependency on the demo's specific deploymenttools/infrastructure/test/test_kpi_views.py) gains a case per metric, seeded with a known Record sequence — this is where a definition change must break a testdc-kpidashboard, populated by the demo stackdoc/src/dc/kpi_views.mddocuments each metric's definition and what it deliberately does not claimBlocked by